Adding support for standalone live-boot as initramfs generator.
This commit is contained in:
parent
f21aa58cb7
commit
b37dd32db4
|
@ -70,7 +70,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -122,7 +122,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
@ -135,7 +135,7 @@ case "${LH_BINARY_IMAGES}" in
|
|||
DESTDIR_LIVE="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
DESTDIR_LIVE="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
@ -171,7 +171,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_USERNAME}" != "user" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
|
@ -187,7 +187,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_HOSTNAME}" != "debian" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
|
|
|
@ -96,7 +96,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
@ -109,7 +109,7 @@ case "${LH_BINARY_IMAGES}" in
|
|||
DESTDIR_LIVE="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
DESTDIR_LIVE="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
@ -145,7 +145,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_USERNAME}" != "user" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
|
@ -161,7 +161,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_HOSTNAME}" != "debian" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
|
|
|
@ -48,7 +48,7 @@ case "${LH_INITRAMFS}" in
|
|||
DESTDIR="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
DESTDIR="binary/live"
|
||||
;;
|
||||
|
||||
|
@ -77,7 +77,7 @@ cp chroot/boot/"${LINUX}"-* "${DESTDIR}"
|
|||
cp chroot/boot/initrd.img-* "${DESTDIR}"
|
||||
|
||||
case "${LH_INITRAMFS}" in
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ -e chroot/usr/share/doc/live-initramfs/parameters.txt ]
|
||||
then
|
||||
cp chroot/usr/share/doc/live-initramfs/parameters.txt "${DESTDIR}"/parameters.txt
|
||||
|
|
|
@ -49,7 +49,7 @@ case "${LH_INITRAMFS}" in
|
|||
SUFFIX="manifest"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
SUFFIX="packages"
|
||||
;;
|
||||
|
|
|
@ -84,7 +84,7 @@ case "${LH_INITRAMFS}" in
|
|||
DESTDIR="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
DESTDIR="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -66,7 +66,7 @@ then
|
|||
ORIGDIR="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
ORIGDIR="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -53,7 +53,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -113,7 +113,7 @@ case "${LH_INITRAMFS}" in
|
|||
DESTDIR_LIVE="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
DESTDIR_LIVE="binary/live"
|
||||
;;
|
||||
|
@ -138,7 +138,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_USERNAME}" != "user" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
|
@ -154,7 +154,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_HOSTNAME}" != "debian" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
|
|
|
@ -357,7 +357,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
@ -424,7 +424,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_USERNAME}" != "user" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
|
@ -440,7 +440,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_HOSTNAME}" != "debian" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
|
|
|
@ -129,7 +129,7 @@ case "${LH_INITRAMFS}" in
|
|||
INITFS="casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
INITFS="live"
|
||||
;;
|
||||
esac
|
||||
|
@ -142,7 +142,7 @@ case "${LH_BINARY_IMAGES}" in
|
|||
DESTDIR_LIVE="binary/casper"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
DESTDIR_LIVE="binary/live"
|
||||
;;
|
||||
esac
|
||||
|
@ -177,7 +177,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_USERNAME}" != "user" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} username=${LH_USERNAME}"
|
||||
|
@ -193,7 +193,7 @@ then
|
|||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
;;
|
||||
|
||||
live-initramfs)
|
||||
live-initramfs|live-boot)
|
||||
if [ "${LH_HOSTNAME}" != "debian" ]
|
||||
then
|
||||
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} hostname=${LH_HOSTNAME}"
|
||||
|
|
|
@ -159,13 +159,13 @@ esac
|
|||
|
||||
# Update initramfs (always, because of udev rules in initrd)
|
||||
case "${LH_INITRAMFS}" in
|
||||
live-initramfs)
|
||||
#UPDATE_INITRAMFS_OPTIONS="LIVE_GENERATE_UUID=1"
|
||||
;;
|
||||
|
||||
casper)
|
||||
UPDATE_INITRAMFS_OPTIONS="CASPER_GENERATE_UUID=1"
|
||||
;;
|
||||
|
||||
live-initramfs|live-boot)
|
||||
#UPDATE_INITRAMFS_OPTIONS="LIVE_GENERATE_UUID=1"
|
||||
;;
|
||||
esac
|
||||
|
||||
Chroot chroot "${UPDATE_INITRAMFS_OPTIONS} update-initramfs -k all -t -u"
|
||||
|
@ -198,7 +198,7 @@ case "${LH_INITRAMFS}" in
|
|||
ID="999"
|
||||
;;
|
||||
|
||||
*)
|
||||
live-initramfs|live-boot)
|
||||
ID="1000"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -54,10 +54,11 @@ warn_initrd = No
|
|||
EOF
|
||||
|
||||
# Diverting update-initramfs
|
||||
#if [ "${LH_INITRAMFS}" = "live-initramfs" ]
|
||||
#then
|
||||
# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
|
||||
#fi
|
||||
#case "${LH_INITRAMFS}" in
|
||||
# live-initramfs|live-boot)
|
||||
# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
|
||||
# ;;
|
||||
#esac
|
||||
|
||||
if [ "${LH_LINUX_PACKAGES}" != "none" ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue