From 45c6726bd3510ac54bf32a6d08bf2ed24c78b479 Mon Sep 17 00:00:00 2001 From: jonas Date: Sat, 14 Oct 2006 10:07:24 +0000 Subject: Better name for default postprocessing file. git-svn-id: svn+ssh://xayide/home/jonas/private_svn/fleshybrid/homebase@36 8f53b18a-e215-0410-8885-9f593d34873e --- common-settings | 2 +- defaults-aftermath.cfg | 159 +++++++++++++++++++++++++++++++++++++++++++++++++ defaults-fixed.cfg | 159 ------------------------------------------------- 3 files changed, 160 insertions(+), 160 deletions(-) create mode 100644 defaults-aftermath.cfg delete mode 100644 defaults-fixed.cfg diff --git a/common-settings b/common-settings index ea4d18e..84d49d1 100644 --- a/common-settings +++ b/common-settings @@ -7,6 +7,6 @@ set -e . ./defaults.cfg || exit 1 . ./host.cfg || exit 1 . ./target.cfg || exit 1 -. ./defaults-fixed.cfg || exit 1 +. ./defaults-aftermath.cfg || exit 1 exit 0 diff --git a/defaults-aftermath.cfg b/defaults-aftermath.cfg new file mode 100644 index 0000000..8d78323 --- /dev/null +++ b/defaults-aftermath.cfg @@ -0,0 +1,159 @@ +#!/bin/sh + +# FIXME: Rewrite all config_MANDATED options as functions + +# Resolve bootloaders and install targets +syslinuxdev_host='' +isolinuxdev_host='' +grubdev_host='' +lilodev_host='' +partno=0 +for bootloader in $bootloaders; do + let partno=$partno+1 + if [ $partno -gt 4 ]; then + echo 'ERROR: No more than 4 bootloaders supported!' >&2 + exit 1 + fi + case $bootloader in + SYSLINUX) + [ -n "$syslinuxdev_host" ] && continue + syslinuxdev_host="$usbdev_host$partno" + thisfs='' + for fs in $selectable_filesystems; do + case $fs in + vfat|msdos) + thisfs=$fs + continue 2 + ;; + esac + done + if [ -z "$thisfs" ]; then + echo "ERROR: None of the selectable filesystems suitable for $bootloader"'!' >&2 + exit 1 + fi + eval fs$partno=$thisfs + ;; + GRUB) + [ -n "$grubdev_host" ] && continue + grubdev_host="$usbdev_host$partno" + let partno_grub=$partno-1 || partno_grub=0 + grubdev_grub="$usbdev_grub,$partno_grub" + thisfs='' + for fs in $selectable_filesystems; do + case $fs in + ext2|ext3|e2fs|e3fs|ext2fs|ext3fs) + thisfs=e2fs + continue 2 + ;; + fat|vfat|dos) + thisfs=fat + continue 2 + ;; + isofs) + # FIXME: Do we need a specific 1st stage bootloader defined here as well? + thisfs=$fs + continue 2 + ;; + jfs|reiserfs|xfs|minix) + thisfs=$fs + continue 2 + ;; + esac + done + if [ -z "$thisfs" ]; then + echo "ERROR: None of the selectable filesystems suitable for $bootloader"'!' >&2 + exit 1 + fi + eval fs$partno=$thisfs + ;; + LILO|ISOLINUX) + echo "ERROR: bootloader \"$bootloader\" not yet implemented"'!' >&2 + exit 1 + ;; + *) + echo "ERROR: Unknown bootloader \"$bootloader\""'!' >&2 + exit 1 + ;; + esac +done +# TODO: Loop through all possible bootloaders instead of checking only these two +if [ -n "$grubdev_host" ] && [ -n "$syslinuxdev_host" ]; then + MULTIPLE_BOOTLOADERS="yes" +fi +if [ "$MULTIPLE_BOOTLOADERS" = "yes" ]; then + MBR="yes" +fi +if [ -z "$grubdev_host$syslinuxdev_host$isolinuxdev_host$lilodev_host" ]; then + echo 'ERROR: No bootloader defined!' >&2 + exit 1 +fi +if [ -n "$syslinuxdev_host" ] && [ "$ROOTFS" != "isofs" ]; then + INCOMPATIBLE_FS="yes" +fi +bootdev_host="${usbdev_host}1" +# FIXME: Set rootdev to dev of highest priority bootloader matching ROOTFS +if [ "$MULTIPLE_BOOTLOADERS" = "yes" ] || [ "$INCOMPATIBLE_FS" = "yes" ]; then + rootdev_host="${usbdev_host}2" + rootdev_target="${usbdev_target}2" +else + rootdev_host="${usbdev_host}1" + rootdev_target="${usbdev_target}1" +fi +if [ "$FLASHYBRID" = "yes" ] && [ "$ROOTFS" = "isofs" ]; then + echo 'ERROR: FLASHYBRID requires a writable root filesystem!' >&2 + exit 1 +fi +# FIXME: Support rolling the prepared system into a read-only ISO +# filesystem instead of using flashybrid +if [ "$ROOTFS" = "isofs" ]; then + echo 'ERROR: isofs root filesystem is not yet supported!' >&2 + exit 1 +fi + +debootstrap_excludes="lilo,ipchains,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig,syslinux,logrotate,mailx,at,makedev,wget" +debootstrap_excludes="$debootstrap_excludes,nvi,base-config,cron,ed,fdutils,gettext-base,groff-base,info,iptables,man-db,manpages,nano,tasksel,telnet,apt-utils" +debootstrap_excludes="$debootstrap_excludes,bsdmainutils" +#debootstrap_excludes="$debootstrap_excludes,klogd,sysklogd" +debootstrap_excludes="$debootstrap_excludes,libpcap0.7" +debootstrap_excludes="$debootstrap_excludes,libtextwrap1,libdb4.2,console-common" +debootstrap_excludes="$debootstrap_excludes,console-data,console-tools,libconsole" + +# Save space by dropping MTA +debootstrap_excludes="$debootstrap_excludes,exim,exim4-base,exim4,exim4-config,exim4-daemon-light,libopencdk8,libpcre3,libtasn1-2,libgcrypt11,libgcrypt7,libgdbm3,libgnutls10,libgnutls11,libgpg-error0,liblockfile1,liblzo1" + +# Save space by dropping debconf i18n support +# (also allows to avoid logrotate - nasty to configure for r/o systems!) +#debootstrap_excludes="$debootstrap_excludes,debconf-i18n,liblocale-gettext-perl,libtext-charwidth-perl,libtext-iconv-perl,libtext-wrapi18n-perl" +#debootstrap_includes="debconf-english" +## FIXME: debootstrap currently broken and cannot include debconf-english, +## so do that as regular aptitude run within 1_makerootfs.sh. +debootstrap_excludes="$debootstrap_excludes,liblocale-gettext-perl,libtext-charwidth-perl,libtext-iconv-perl,libtext-wrapi18n-perl" +#debootstrap_excludes="$debootstrap_excludes,debconf-i18n" +#debootstrap_includes="debconf-english" + +# Alternative DHCP client implementations +debootstrap_excludes="$debootstrap_excludes,dhcp-client" + +case $DHCPCLIENT in + dhcp3) + aptitude_dhcpclient_install="dhcp3-client" + ;; + udhcpc) + aptitude_dhcpclient_install="udhcpc" + ;; + *) + echo "ERROR: Unknown dhcp client \"$DHCPCLIENT\""'!' >&2 + exit 1 + ;; +esac + +[ -n "$grubdev_host" ] && aptitude_install="$aptitude_install grub" +[ "$FLASHYBRID" = "yes" ] && aptitude_install="$aptitude_install flashybrid" + +if [ "$diskfs" = "nfs" ] || [ "$pubfs" = "nfs" ]; then + aptitude_install="$aptitude_install nfs-common" +fi + +# Kernel modules to install into the initrd +modules_install="usb-storage sd_mod scsi_mod uhci uhci-hcd ehci-hcd usbcore" +#modules_install="$modules_install vfat nls_cp437 msdos fat" diff --git a/defaults-fixed.cfg b/defaults-fixed.cfg deleted file mode 100644 index 8d78323..0000000 --- a/defaults-fixed.cfg +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/sh - -# FIXME: Rewrite all config_MANDATED options as functions - -# Resolve bootloaders and install targets -syslinuxdev_host='' -isolinuxdev_host='' -grubdev_host='' -lilodev_host='' -partno=0 -for bootloader in $bootloaders; do - let partno=$partno+1 - if [ $partno -gt 4 ]; then - echo 'ERROR: No more than 4 bootloaders supported!' >&2 - exit 1 - fi - case $bootloader in - SYSLINUX) - [ -n "$syslinuxdev_host" ] && continue - syslinuxdev_host="$usbdev_host$partno" - thisfs='' - for fs in $selectable_filesystems; do - case $fs in - vfat|msdos) - thisfs=$fs - continue 2 - ;; - esac - done - if [ -z "$thisfs" ]; then - echo "ERROR: None of the selectable filesystems suitable for $bootloader"'!' >&2 - exit 1 - fi - eval fs$partno=$thisfs - ;; - GRUB) - [ -n "$grubdev_host" ] && continue - grubdev_host="$usbdev_host$partno" - let partno_grub=$partno-1 || partno_grub=0 - grubdev_grub="$usbdev_grub,$partno_grub" - thisfs='' - for fs in $selectable_filesystems; do - case $fs in - ext2|ext3|e2fs|e3fs|ext2fs|ext3fs) - thisfs=e2fs - continue 2 - ;; - fat|vfat|dos) - thisfs=fat - continue 2 - ;; - isofs) - # FIXME: Do we need a specific 1st stage bootloader defined here as well? - thisfs=$fs - continue 2 - ;; - jfs|reiserfs|xfs|minix) - thisfs=$fs - continue 2 - ;; - esac - done - if [ -z "$thisfs" ]; then - echo "ERROR: None of the selectable filesystems suitable for $bootloader"'!' >&2 - exit 1 - fi - eval fs$partno=$thisfs - ;; - LILO|ISOLINUX) - echo "ERROR: bootloader \"$bootloader\" not yet implemented"'!' >&2 - exit 1 - ;; - *) - echo "ERROR: Unknown bootloader \"$bootloader\""'!' >&2 - exit 1 - ;; - esac -done -# TODO: Loop through all possible bootloaders instead of checking only these two -if [ -n "$grubdev_host" ] && [ -n "$syslinuxdev_host" ]; then - MULTIPLE_BOOTLOADERS="yes" -fi -if [ "$MULTIPLE_BOOTLOADERS" = "yes" ]; then - MBR="yes" -fi -if [ -z "$grubdev_host$syslinuxdev_host$isolinuxdev_host$lilodev_host" ]; then - echo 'ERROR: No bootloader defined!' >&2 - exit 1 -fi -if [ -n "$syslinuxdev_host" ] && [ "$ROOTFS" != "isofs" ]; then - INCOMPATIBLE_FS="yes" -fi -bootdev_host="${usbdev_host}1" -# FIXME: Set rootdev to dev of highest priority bootloader matching ROOTFS -if [ "$MULTIPLE_BOOTLOADERS" = "yes" ] || [ "$INCOMPATIBLE_FS" = "yes" ]; then - rootdev_host="${usbdev_host}2" - rootdev_target="${usbdev_target}2" -else - rootdev_host="${usbdev_host}1" - rootdev_target="${usbdev_target}1" -fi -if [ "$FLASHYBRID" = "yes" ] && [ "$ROOTFS" = "isofs" ]; then - echo 'ERROR: FLASHYBRID requires a writable root filesystem!' >&2 - exit 1 -fi -# FIXME: Support rolling the prepared system into a read-only ISO -# filesystem instead of using flashybrid -if [ "$ROOTFS" = "isofs" ]; then - echo 'ERROR: isofs root filesystem is not yet supported!' >&2 - exit 1 -fi - -debootstrap_excludes="lilo,ipchains,pcmcia-cs,ppp,pppoe,pppoeconf,pppconfig,syslinux,logrotate,mailx,at,makedev,wget" -debootstrap_excludes="$debootstrap_excludes,nvi,base-config,cron,ed,fdutils,gettext-base,groff-base,info,iptables,man-db,manpages,nano,tasksel,telnet,apt-utils" -debootstrap_excludes="$debootstrap_excludes,bsdmainutils" -#debootstrap_excludes="$debootstrap_excludes,klogd,sysklogd" -debootstrap_excludes="$debootstrap_excludes,libpcap0.7" -debootstrap_excludes="$debootstrap_excludes,libtextwrap1,libdb4.2,console-common" -debootstrap_excludes="$debootstrap_excludes,console-data,console-tools,libconsole" - -# Save space by dropping MTA -debootstrap_excludes="$debootstrap_excludes,exim,exim4-base,exim4,exim4-config,exim4-daemon-light,libopencdk8,libpcre3,libtasn1-2,libgcrypt11,libgcrypt7,libgdbm3,libgnutls10,libgnutls11,libgpg-error0,liblockfile1,liblzo1" - -# Save space by dropping debconf i18n support -# (also allows to avoid logrotate - nasty to configure for r/o systems!) -#debootstrap_excludes="$debootstrap_excludes,debconf-i18n,liblocale-gettext-perl,libtext-charwidth-perl,libtext-iconv-perl,libtext-wrapi18n-perl" -#debootstrap_includes="debconf-english" -## FIXME: debootstrap currently broken and cannot include debconf-english, -## so do that as regular aptitude run within 1_makerootfs.sh. -debootstrap_excludes="$debootstrap_excludes,liblocale-gettext-perl,libtext-charwidth-perl,libtext-iconv-perl,libtext-wrapi18n-perl" -#debootstrap_excludes="$debootstrap_excludes,debconf-i18n" -#debootstrap_includes="debconf-english" - -# Alternative DHCP client implementations -debootstrap_excludes="$debootstrap_excludes,dhcp-client" - -case $DHCPCLIENT in - dhcp3) - aptitude_dhcpclient_install="dhcp3-client" - ;; - udhcpc) - aptitude_dhcpclient_install="udhcpc" - ;; - *) - echo "ERROR: Unknown dhcp client \"$DHCPCLIENT\""'!' >&2 - exit 1 - ;; -esac - -[ -n "$grubdev_host" ] && aptitude_install="$aptitude_install grub" -[ "$FLASHYBRID" = "yes" ] && aptitude_install="$aptitude_install flashybrid" - -if [ "$diskfs" = "nfs" ] || [ "$pubfs" = "nfs" ]; then - aptitude_install="$aptitude_install nfs-common" -fi - -# Kernel modules to install into the initrd -modules_install="usb-storage sd_mod scsi_mod uhci uhci-hcd ehci-hcd usbcore" -#modules_install="$modules_install vfat nls_cp437 msdos fat" -- cgit v1.2.3