|
From: Heiko Z. <smi...@us...> - 2005-01-09 21:31:41
|
Update of /cvsroot/devil-linux/build/config/etc/initrd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13830/config/etc/initrd Modified Files: linuxrc mount_cdrom Log Message: remote update now copies everything in initrd and reboot from within linuxrc Index: linuxrc =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- linuxrc 9 Jan 2005 19:55:48 -0000 1.75 +++ linuxrc 9 Jan 2005 21:31:31 -0000 1.76 @@ -363,7 +363,15 @@ #change to new root and start up the real system pivot_root . initrd -exec /bin/chroot . /sbin/pre_init $DL_CONFIG_SOURCE $DL_CONFIG_FILE $@ <dev/console >dev/console 2>&1 +# check if the DL ISO got upgraded +if [ -e /cdrom/shm/dl_iso_replaced ]; then + $RED + echo "Rebooting..." + $NORMAL + exec /bin/chroot . /sbin/reboot -f +else + exec /bin/chroot . /sbin/pre_init $DL_CONFIG_SOURCE $DL_CONFIG_FILE $@ <dev/console >dev/console 2>&1 +fi # something went wrong echo Index: mount_cdrom =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/initrd/mount_cdrom,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- mount_cdrom 20 Dec 2004 02:28:13 -0000 1.26 +++ mount_cdrom 9 Jan 2005 21:31:31 -0000 1.27 @@ -78,8 +78,19 @@ $RED rm -f /mnt/bootcd.iso &> /dev/null if mv /mnt/bootcd.iso.new /mnt/bootcd.iso ; then - # create flag file, so the other scripts know about it - touch /shm/dl_iso_replaced + # create flag file, so the other scripts know about it + touch /shm/dl_iso_replaced + $BLUE + echo "Upgrading System Boot Files" + $NORMAL + + mount -o loop -t iso9660 /mnt/bootcd.iso /cdrom + + cp -fp /cdrom/boot/* /mnt/boot/ 2> /dev/null + cp -fp /cdrom/DEVIL-LINUX /mnt/ + sync + umount /mnt/ &> /dev/null + $RED else echo "Activation failed" fi |