summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-04-23 17:37:36 +0200
committerDaniel Baumann <daniel@debian.org>2011-04-23 17:37:36 +0200
commit890a6e5fb397e745ab3fb4bb5f8eda361716ed4e (patch)
treec10077c69b60dbabe1a2fc71739e6d95930b4557
parentfb1e45aaeb04688557dbdd20ebf89e3785a16bd5 (diff)
downloadvyos-live-build-890a6e5fb397e745ab3fb4bb5f8eda361716ed4e.tar.gz
vyos-live-build-890a6e5fb397e745ab3fb4bb5f8eda361716ed4e.zip
Removing kernel-img.conf handling for lenny and older.
-rwxr-xr-xscripts/build/lb_binary_rootfs6
-rwxr-xr-xscripts/build/lb_chroot3
-rwxr-xr-xscripts/build/lb_chroot_linux-image161
3 files changed, 59 insertions, 111 deletions
diff --git a/scripts/build/lb_binary_rootfs b/scripts/build/lb_binary_rootfs
index 730535af7..f6c35fd7d 100755
--- a/scripts/build/lb_binary_rootfs
+++ b/scripts/build/lb_binary_rootfs
@@ -123,7 +123,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
rm -f .lock
mv chroot/chroot chroot.tmp
- lb chroot_linux-image remove ${*}
lb chroot_sources remove ${*}
lb chroot_apt remove ${*}
lb chroot_hostname remove ${*}
@@ -154,7 +153,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
lb chroot_hostname install ${*}
lb chroot_apt install ${*}
lb chroot_sources install ${*}
- lb chroot_linux-image install ${*}
touch .lock
else
@@ -207,7 +205,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
rm -f .lock
mv chroot/chroot chroot.tmp
- lb chroot_linux-image remove ${*}
lb chroot_sources remove ${*}
lb chroot_apt remove ${*}
lb chroot_hostname remove ${*}
@@ -238,7 +235,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
lb chroot_hostname install ${*}
lb chroot_apt install ${*}
lb chroot_sources install ${*}
- lb chroot_linux-image install ${*}
touch .lock
else
@@ -339,7 +335,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
rm -f .lock
mv chroot/chroot chroot.tmp
- lb chroot_linux-image remove ${*}
lb chroot_sources remove ${*}
lb chroot_apt remove ${*}
lb chroot_hostname remove ${*}
@@ -370,7 +365,6 @@ case "${LB_CHROOT_FILESYSTEM}" in
lb chroot_hostname install ${*}
lb chroot_apt install ${*}
lb chroot_sources install ${*}
- lb chroot_linux-image install ${*}
touch .lock
else
diff --git a/scripts/build/lb_chroot b/scripts/build/lb_chroot
index beff622d0..b24e62573 100755
--- a/scripts/build/lb_chroot
+++ b/scripts/build/lb_chroot
@@ -50,9 +50,9 @@ lb chroot_resolv install ${*}
lb chroot_hostname install ${*}
lb chroot_apt install ${*}
lb chroot_sources install ${*}
-lb chroot_linux-image install ${*}
# Customizing chroot
+lb chroot_linux-image ${*}
lb chroot_preseed ${*}
lb chroot_local-preseed ${*}
lb chroot_tasks ${*}
@@ -70,7 +70,6 @@ lb chroot_hacks ${*}
lb chroot_interactive ${*}
# Deconfiguring chroot
-lb chroot_linux-image remove ${*}
lb chroot_sources remove ${*}
lb chroot_apt remove ${*}
lb chroot_hostname remove ${*}
diff --git a/scripts/build/lb_chroot_linux-image b/scripts/build/lb_chroot_linux-image
index ad8c6e618..39ee0fae5 100755
--- a/scripts/build/lb_chroot_linux-image
+++ b/scripts/build/lb_chroot_linux-image
@@ -14,9 +14,9 @@ set -e
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Setting static variables
-DESCRIPTION="$(Echo 'manage /etc/kernel-img.conf')"
+DESCRIPTION="$(Echo 'schedule kernel packages for installation')"
HELP=""
-USAGE="${PROGRAM} {install|remove} [--force]"
+USAGE="${PROGRAM} [--force]"
Arguments "${@}"
@@ -27,104 +27,59 @@ Set_defaults
# Requiring stage file
Require_stagefile .stage/config .stage/bootstrap
-case "${1}" in
- install)
- Echo_message "Configuring file /etc/kernel-img.conf"
-
- # Checking stage file
- Check_stagefile .stage/chroot_linux-image
-
- # Checking lock file
- Check_lockfile .lock
-
- # Creating lock file
- Create_lockfile .lock
-
- if [ -f chroot/etc/kernel-img.conf ]
- then
- # Saving kernel-img.conf
- cp chroot/etc/kernel-img.conf chroot/etc/kernel-img.conf.old
- fi
-
- # Configuring kernel-img.conf
-cat >> chroot/etc/kernel-img.conf << EOF
-do_bootloader = No
-do_initrd = Yes
-warn_initrd = No
-EOF
-
- # Diverting update-initramfs
- #case "${LB_INITRAMFS}" in
- # live-boot)
- # mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
- # ;;
- #esac
-
- if [ "${LB_LINUX_PACKAGES}" != "none" ]
- then
- for FLAVOUR in ${LB_LINUX_FLAVOURS}
- do
- for PACKAGE in ${LB_LINUX_PACKAGES}
- do
- echo ${PACKAGE}-${FLAVOUR} >> chroot/root/chroot_packages
- done
- done
- fi
-
- # Queue installation of linux-image and ${LB_INITRAMFS}
- if [ "${LB_INITRAMFS}" != "none" ]
- then
- echo ${LB_INITRAMFS} >> chroot/root/chroot_packages
- fi
-
- # Queue installation of live-config
- if [ "${LB_INITSYSTEM}" != "none" ]
- then
- echo "live-config live-config-${LB_INITSYSTEM}" >> chroot/root/chroot_packages
- fi
-
- # Do initsystem specific hacks
- if [ "${LB_INITSYSTEM}" != "sysvinit" ]
- then
- # lets see if we still need the squeeze's "pre init system policy discussion" hack:
-
- IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
- RC="$?"
-
- if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
- then
- # sysvinit is both installed and essential, ugly hack to remove it
- Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
- fi
- fi
-
- # Creating stage file
- Create_stagefile .stage/chroot_linux-image
- ;;
-
- remove)
- Echo_message "Deconfiguring file /etc/kernel-img.conf"
-
- # Checking lock file
- Check_lockfile .lock
-
- # Creating lock file
- Create_lockfile .lock
-
- if [ -f chroot/etc/kernel-img.conf.old ]
- then
- # Restoring kernel-img.conf file
- mv chroot/etc/kernel-img.conf.old chroot/etc/kernel-img.conf
- else
- # Removing kernel-img.conf file
- Truncate chroot/etc/kernel-img.conf
- fi
-
- # Removing stage file
- rm -f .stage/chroot_linux-image
- ;;
-
- *)
- Usage
- ;;
-esac
+# Checking stage file
+Check_stagefile .stage/chroot_linux-image
+
+# Checking lock file
+Check_lockfile .lock
+
+# Creating lock file
+Create_lockfile .lock
+
+# Diverting update-initramfs
+#case "${LB_INITRAMFS}" in
+# live-boot)
+# mv chroot/usr/sbin/update-initramfs chroot/usr/sbin/update-initramfs.live-build
+# ;;
+#esac
+
+if [ "${LB_LINUX_PACKAGES}" != "none" ]
+then
+ for FLAVOUR in ${LB_LINUX_FLAVOURS}
+ do
+ for PACKAGE in ${LB_LINUX_PACKAGES}
+ do
+ echo ${PACKAGE}-${FLAVOUR} >> chroot/root/chroot_packages
+ done
+ done
+fi
+
+# Queue installation of linux-image and ${LB_INITRAMFS}
+if [ "${LB_INITRAMFS}" != "none" ]
+then
+ echo ${LB_INITRAMFS} >> chroot/root/chroot_packages
+fi
+
+# Queue installation of live-config
+if [ "${LB_INITSYSTEM}" != "none" ]
+then
+ echo "live-config live-config-${LB_INITSYSTEM}" >> chroot/root/chroot_packages
+fi
+
+# Do initsystem specific hacks
+if [ "${LB_INITSYSTEM}" != "sysvinit" ]
+then
+ # lets see if we still need the squeeze's "pre init system policy discussion" hack:
+
+ IS_SYSVINIT_ESSENTIAL="$(Chroot chroot dpkg-query --show --showformat='${Essential}\n' sysvinit)"
+ RC="$?"
+
+ if [ "${IS_SYSVINIT_ESSENTIAL}" != "no" ] && [ "${RC}" = "0" ]
+ then
+ # sysvinit is both installed and essential, ugly hack to remove it
+ Chroot chroot dpkg --force-remove-essential --remove sysvinit || true
+ fi
+fi
+
+# Creating stage file
+Create_stagefile .stage/chroot_linux-image