From ca22d30f043a71bb58245a62266a7627f210889f Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 29 Jul 2014 10:51:42 -0500 Subject: [PATCH] finish: cut a little to deep Signed-off-by: Robert Nelson --- lib/debian-finish.sh | 10 ++++++++++ lib/ubuntu-finish.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index 4a3d193..d1e9a5c 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -38,6 +38,16 @@ else echo "ERROR: [/boot/uboot/mounts] was missing..." >> /var/log/netinstall.log fi +rm -f /boot/uboot/uEnv.txt || true + +if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then + if [ -f "/boot/uboot/backup/normal.txt" ] ; then + sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/backup/normal.txt + sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/backup/normal.txt + mv /boot/uboot/backup/normal.txt /boot/uboot/uEnv.txt + fi +fi + if [ "x${serial_tty}" != "x" ] ; then cp /etc/inittab /boot/uboot/backup/inittab serial_num=$(echo -n "${serial_tty}"| tail -c -1) diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index f0c113b..e2545ef 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -38,6 +38,16 @@ else echo "ERROR: [/boot/uboot/mounts] was missing..." >> /var/log/netinstall.log fi +rm -f /boot/uboot/uEnv.txt || true + +if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then + if [ -f "/boot/uboot/backup/normal.txt" ] ; then + sed -i -e 's:FINAL_PART:'$FINAL_PART':g' /boot/uboot/backup/normal.txt + sed -i -e 's:FINAL_FSTYPE:'$FINAL_FSTYPE':g' /boot/uboot/backup/normal.txt + mv /boot/uboot/backup/normal.txt /boot/uboot/uEnv.txt + fi +fi + if [ "x${serial_tty}" != "x" ] ; then cat > /etc/init/${serial_tty}.conf <<-__EOF__ start on stopped rc RUNLEVEL=[2345]