Dropping automagics for casper.

Future live-build versions will still allow to use casper,
but its configuration will be done differently by hooks
in the config tree, rather than embedded and maintenance intensive
code in live-build itself.
This commit is contained in:
Daniel Baumann 2015-05-03 15:49:57 +02:00
parent d18cb12cc1
commit f93e83e351
11 changed files with 2 additions and 98 deletions

View File

@ -234,16 +234,8 @@ Set_defaults ()
# Setting initramfs hook
case "${LB_SYSTEM}" in
live)
case "${LB_MODE}" in
ubuntu)
LB_INITRAMFS="${LB_INITRAMFS:-casper}"
;;
*)
LB_INITRAMFS="${LB_INITRAMFS:-live-boot}"
;;
esac
;;
normal)
LB_INITRAMFS="${LB_INITRAMFS:-none}"
@ -751,11 +743,6 @@ Set_defaults ()
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=live components memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
;;
casper)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-boot=casper quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-boot=casper memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"
;;
none)
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE:-quiet splash}"
LB_BOOTAPPEND_LIVE_FAILSAFE="${LB_BOOTAPPEND_LIVE_FAILSAFE:-memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal}"

View File

@ -97,40 +97,6 @@ then
esac
fi
case "${LB_INITRAMFS}" in
casper)
for INITRD in binary/casper/initrd.img*
do
mkdir -p binary/uuid
cd binary/uuid
case "${LB_INITRAMFS_COMPRESSION}" in
gzip)
zcat "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
;;
bzip2)
bzcat "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
;;
lzma)
lzcat -S "" "../../${INITRD}" | cpio --quiet -id conf/uuid.conf
;;
esac
if [ -e conf/uuid.conf ]
then
mv conf/uuid.conf "../.disk/casper-uuid${INITRD#binary/casper/initrd.img}"
else
Echo_warning "Failed to find casper uuid.conf in '${INITRD}'"
fi
cd ${OLDPWD}
rm -rf binary/uuid
done
;;
esac
case "${LB_DEBIAN_INSTALLER}" in
cdrom)
echo "main" > binary/.disk/base_components

View File

@ -132,10 +132,6 @@ else
fi
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
;;
live-boot)
INITFS="live"
;;
@ -149,10 +145,6 @@ esac
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
;;
live-boot)
DESTDIR_LIVE="binary/live"
;;

View File

@ -106,10 +106,6 @@ else
fi
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
;;
live-boot)
INITFS="live"
;;
@ -123,10 +119,6 @@ esac
case "${LIVE_IMAGE_TYPE}" in
iso*|tar)
case "${LB_INITRAMFS}" in
casper)
DESTDIR_LIVE="binary/casper"
;;
live-boot)
DESTDIR_LIVE="binary/live"
;;

View File

@ -44,10 +44,6 @@ Check_lockfile .lock
Create_lockfile .lock
case "${LB_INITRAMFS}" in
casper)
DESTDIR="binary/casper"
;;
live-boot)
DESTDIR="binary/live"
;;

View File

@ -44,11 +44,6 @@ Check_lockfile .lock
Create_lockfile .lock
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
SUFFIX="manifest"
;;
live-boot)
INITFS="live"
SUFFIX="packages"

View File

@ -80,10 +80,6 @@ Install_package
# Setting destination directory
case "${LB_INITRAMFS}" in
casper)
DESTDIR="binary/casper"
;;
live-boot)
DESTDIR="binary/live"
;;

View File

@ -49,10 +49,6 @@ case "${LB_ARCHITECTURES}" in
esac
case "${LB_INITRAMFS}" in
casper)
INITFS="casper"
;;
live-boot)
INITFS="live"
;;

View File

@ -48,10 +48,6 @@ Check_architectures amd64 i386
Check_crossarchitectures
case "${LB_INITRAMFS}" in
casper)
_INITRAMFS="casper"
;;
*)
_INITRAMFS="live"
;;

View File

@ -65,10 +65,6 @@ esac
# Update initramfs (always, because of udev rules in initrd)
case "${LB_INITRAMFS}" in
casper)
UPDATE_INITRAMFS_OPTIONS="CASPER_GENERATE_UUID=1"
;;
live-boot)
#UPDATE_INITRAMFS_OPTIONS="LIVE_GENERATE_UUID=1"
;;
@ -104,10 +100,6 @@ case "${LB_INITRAMFS_COMPRESSION}" in
esac
case "${LB_INITRAMFS}" in
casper)
ID="999"
;;
live-boot)
ID="1000"
;;

View File

@ -61,7 +61,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--grub-splash FILE]\n\
\t [--gzip-options OPTION|\"OPTIONS\"]\n\
\t [--ignore-system-defaults]\n\
\t [--initramfs auto|none|live-boot|casper]\n\
\t [--initramfs auto|none|live-boot]\n\
\t [--initramfs-compression bzip2|gzip|lzma]\n\
\t [--initsystem sysvinit|systemd|upstart|none]\n\
\t [--image-name [NAME]\n\
@ -1350,10 +1350,6 @@ then
esac
;;
casper)
echo "casper" > config/package-lists/live.list.chroot
;;
*)
;;
esac