From ecc50b8982c14e5e0d51d06866938b5040d3ce3c Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Mon, 20 Aug 2012 10:48:30 -0500 Subject: [PATCH] ubuntu: move flash-kernel.conf to chroot script Signed-off-by: Robert Nelson --- TODO | 1 - mk_mmc.sh | 1 - scripts/flash-kernel.conf | 21 --------------------- scripts/ubuntu-finish.sh | 24 ++++++++++++++++++++++++ scripts/ubuntu-tweaks.diff | 3 +-- 5 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 scripts/flash-kernel.conf diff --git a/TODO b/TODO index 09d28ce..b2278b6 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,3 @@ Easy: * debug.log, to help troubleshoot failures (do we need anything else /boot/uboot/backup/* after install) * random http link to *.deb package (--deb-file just needs to be extended to http case, as it works for local files) -* move most of scripts/*tweaks.diff to scripts/*finish.sh as the *.diff is stuck with busybox limiations.. diff --git a/mk_mmc.sh b/mk_mmc.sh index 7d5f576..867ea33 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -971,7 +971,6 @@ function initrd_preseed_settings { case "${DIST}" in maverick|natty|oneiric|precise|quantal) patch -p1 < "${DIR}/scripts/ubuntu-tweaks.diff" - cp -v "${DIR}/scripts/flash-kernel.conf" ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf cp -v "${DIR}/scripts/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/etc/finish-install.sh ;; squeeze|wheezy) diff --git a/scripts/flash-kernel.conf b/scripts/flash-kernel.conf deleted file mode 100644 index f121f35..0000000 --- a/scripts/flash-kernel.conf +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -UBOOT_PART=/dev/mmcblk0p1 - -echo "flash-kernel stopped by: /etc/flash-kernel.conf" -echo "You are currently running an image built by rcn-ee.net running an rcn-ee" -echo "kernel, to use Ubuntu's Kernel remove the next line" -USE_RCN_EE_KERNEL=1 - -if [ "${USE_RCN_EE_KERNEL}" ] ; then - DIST=$(lsb_release -cs) - - case "${DIST}" in - lucid) - exit 0 - ;; - maverick|natty|oneiric|precise|quantal) - FLASH_KERNEL_SKIP=yes - ;; - esac -fi - diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index d7c02d6..457df03 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -111,3 +111,27 @@ if [ "x${smsc95xx_mem}" != "x" ] ; then echo "vm.min_free_kbytes = ${smsc95xx_mem}" >> /etc/sysctl.conf fi +cat > /etc/flash-kernel.conf <<-__EOF__ +#!/bin/sh +UBOOT_PART=/dev/mmcblk0p1 + +echo "flash-kernel stopped by: /etc/flash-kernel.conf" +echo "You are currently running an image built by rcn-ee.net running an rcn-ee" +echo "kernel, to use Ubuntu's Kernel remove the next line" +USE_RCN_EE_KERNEL=1 + +if [ "\${USE_RCN_EE_KERNEL}" ] ; then + DIST=\$(lsb_release -cs) + + case "\${DIST}" in + lucid) + exit 0 + ;; + maverick|natty|oneiric|precise|quantal) + FLASH_KERNEL_SKIP=yes + ;; + esac +fi + +__EOF__ + diff --git a/scripts/ubuntu-tweaks.diff b/scripts/ubuntu-tweaks.diff index 4ab4ffc..9273e82 100644 --- a/scripts/ubuntu-tweaks.diff +++ b/scripts/ubuntu-tweaks.diff @@ -3,9 +3,8 @@ new file mode 100755 index 0000000..6d06fc7 --- /dev/null +++ b/usr/lib/finish-install.d/08rcn-ee-finish-installing-device -@@ -0,0 +1,27 @@ +@@ -0,0 +1,26 @@ +#!/bin/sh -e -+cp /etc/flash-kernel.conf /target/etc/flash-kernel.conf +cp /etc/finish-install.sh /target/etc/finish-install.sh +chmod a+x /target/etc/finish-install.sh +