Update of /cvsroot/devil-linux/build/config/etc/initrd
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17771
Modified Files:
linuxrc
Log Message:
- added possibility to load DL without configuration media
Index: linuxrc
===================================================================
RCS file: /cvsroot/devil-linux/build/config/etc/initrd/linuxrc,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- linuxrc 6 Oct 2005 19:20:55 -0000 1.83
+++ linuxrc 10 Apr 2006 13:04:09 -0000 1.84
@@ -237,7 +237,7 @@
if [ -z "$IS_CDROM" ];then
beep;
$YELLOW
- echo -e "\n*** Found empty configuration media. ***"
+ echo -e "\n*** Found empty configuration media - $CFG_SRC. ***"
$NORMAL
echo -n "Should I copy default configuration to it?"
if ask_yes_no ; then
@@ -265,9 +265,18 @@
beep; sleep 1; beep; sleep 1; beep;
$RED
- echo -e "Please insert Configuration Media and press 'ENTER'"
+ echo -e "Would you really like to load DL without Configuration Media?"
$NORMAL
- read ANS
+ if ask_yes_no ; then
+ REALLY_LIVE=1
+ DL_CONFIG_SOURCE=/dev/null
+ DL_CONFIG_FILE="etc.tar.bz2"
+ export REALLY_LIVE
+ continue 2
+ else
+ echo -e "Please insert Configuration Media and press 'ENTER'"
+ read ANS
+ fi
echo
done
unset ANS RET
@@ -282,7 +291,7 @@
# check if the DL ISO got upgraded
if [ -e /shm/dl_iso_replaced ]; then
cd /cdrom
- #change to new root
+ #change to new root
pivot_root . initrd
$RED
echo "Rebooting..."
@@ -293,7 +302,16 @@
$GREEN
echo "loading configuration"
$NORMAL
-tar -C /shm -xjf /floppy/$DL_CONFIG_FILE
+if [ "$REALLY_LIVE" = "1" ] ; then
+ # check to see if cdrom has already been mounted
+ if [ ! -e /cdrom/DEVIL-LINUX ] ; then
+ # find the CDROM
+ /mount_cdrom /cdrom
+ fi
+ tar -C /shm -xjf /cdrom/config/etc.tar.bz2
+else
+ tar -C /shm -xjf /floppy/$DL_CONFIG_FILE
+fi
# create mtab for mount
cat /proc/mounts > /etc/mtab
@@ -337,7 +355,9 @@
fi
# unmount config media
-umount /floppy
+if [ "$REALLY_LIVE" != "1" ] ; then
+ umount /floppy
+fi
# Update modules for SCSI CD (if any)
if [ -s /shm/.probed_modules ] ; then
|