From 3ba3d4e2cfd484690145c93aba29cb8a3339626f Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Wed, 3 Oct 2012 13:06:35 -0500 Subject: [PATCH] move the flash-kernel.conf script into mk_mmc.sh Signed-off-by: Robert Nelson --- mk_mmc.sh | 22 ++++++++++++++++++++++ scripts/ubuntu-finish.sh | 24 ------------------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 3a3cba0..d537b87 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -999,6 +999,27 @@ function initrd_cleanup { rm -rf ${TEMPDIR}/initrd-tree/lib/firmware/*-versatile/ || true } +function flash_kernel { + cat > ${TEMPDIR}/initrd-tree/etc/flash-kernel.conf <<-__EOF__ + #!/bin/sh -e + UBOOT_PART=/dev/mmcblk0p1 + + echo "flash-kernel stopped by: /etc/flash-kernel.conf" + USE_CUSTOM_KERNEL=1 + + if [ "\${USE_CUSTOM_KERNEL}" ] ; then + DIST=\$(lsb_release -cs) + + case "\${DIST}" in + maverick|natty|oneiric|precise|quantal) + FLASH_KERNEL_SKIP=yes + ;; + esac + fi + + __EOF__ +} + function finish_installing_device { cat > ${TEMPDIR}/initrd-tree/usr/lib/finish-install.d/08rcn-ee-finish-installing-device <<-__EOF__ #!/bin/sh -e @@ -1038,6 +1059,7 @@ function initrd_preseed_settings { case "${DIST}" in maverick|natty|oneiric|precise|quantal) cp -v "${DIR}/scripts/ubuntu-finish.sh" ${TEMPDIR}/initrd-tree/etc/finish-install.sh + flash_kernel ;; squeeze|wheezy) cp -v "${DIR}/scripts/debian-finish.sh" ${TEMPDIR}/initrd-tree/etc/finish-install.sh diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index 1995e18..b4e22d4 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -113,30 +113,6 @@ 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__ - cat > /etc/init/board_tweaks.conf <<-__EOF__ start on runlevel 2