summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/etc
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-08-15 17:55:04 +0200
committerDirk von Suchodoletz2009-08-15 17:55:04 +0200
commitc09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40 (patch)
treead40efbc1fcb79c76718d77773cb412e4a04b937 /initramfs/stage3-stuff/etc
parentSome trivial stuff ... (diff)
downloadcore-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.tar.gz
core-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.tar.xz
core-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.zip
Re-enabling the functionality to boot from a local block device (mainly
USB sticks). It allows for demonstration purposes and special setups to have the base filesystem locally (see related #156). git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3092 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/stage3-stuff/etc')
-rw-r--r--initramfs/stage3-stuff/etc/functions23
-rw-r--r--initramfs/stage3-stuff/etc/messages8
2 files changed, 17 insertions, 14 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index 7731790c..51f5173b 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -369,8 +369,9 @@ local cfgfile
if [ "x$filepath" != "x" ] ; then
cfgfile=${filepath}
[ "x$fileserv" = "x" ] && fileserv=$(checkip ${serverip})
- # waiting for dns if fireserv is a name
- echo ${fileserv} | grep -qi [a-z] && waitfor /tmp/dhcp-done 10000
+ # wait for dns if "fileserv" is a name and not lbd device
+ [ "$fileprot" != "lbd" ] && \
+ echo ${fileserv} | grep -qi [a-z] && waitfor /tmp/dhcp-done 10000
[ $DEBUGLEVEL -ge 1 ] && echo "fileget - fileprot:$fileprot, filepath:\
$filepath, fileserv:$fileserv" >>$LOGFILE
case "$fileprot" in
@@ -378,15 +379,17 @@ $filepath, fileserv:$fileserv" >>$LOGFILE
wget_get $cfgfile $fileprot://$fileserv \
&& { unpack /tmp/$(basename $cfgfile) && break; } 2>>$LOGFILE
;;
- file)
+ lbd)
local ldev=$fileserv
- echo "Waiting for /mnt/etc ...."
- waitfor /mnt/etc 10000
- mkdir /tmp/$ldev
- echo -e "ext2\nreiserfs\nvfat\nxfs" >/etc/filesystems
- mount -o ro /dev/$ldev /tmp/$ldev || error "$init_errlfg"
- unpack /tmp/$ldev/$cfgfile
- umount /dev/$ldev
+ echo "Waiting for configuration file ${cfgfile} ...."
+ [ $DEBUGLEVEL -ge 1 ] && echo "fileget - fileprot:$fileprot, filepath:\
+$filepath, fileserv:$fileserv" >>$LOGFILE
+ waitfor /mnt/${cfgfile} 10000
+ if [ -f /mnt/${cfgfile} ]; then
+ unpack /mnt/$cfgfile
+ else
+ error "$init_errlfg"
+ fi
;;
*)
tftp_get $cfgfile $fileserv \
diff --git a/initramfs/stage3-stuff/etc/messages b/initramfs/stage3-stuff/etc/messages
index 918524b6..f6561f1f 100644
--- a/initramfs/stage3-stuff/etc/messages
+++ b/initramfs/stage3-stuff/etc/messages
@@ -78,10 +78,10 @@ init_cownobld=" Loading of cow module is of no sense if no network/other block
device is used or\n UnionFS/AUFS was specified as read write layer too. Remove \
UnionFS/AUFS token from\n kernel commandline if cowloop should be used instead."
init_nfs=" Mount of root filesystem via NFS was requested via kernel command \
-line\nbut failed. There might be the following reasons for that:\n\
-* No nfs.ko module could be loaded and no NFS support was present in the\n\
-running kernel - see error messages above\n\
-* You tried to mount from wrong server or path ($nfsroot)\n\
+line\n but failed. There might be the following reasons for that:\n \
+* No nfs.ko module could be loaded and no NFS support was present in the\n \
+running kernel - see error messages above\n \
+* You tried to mount from wrong server or path ($nfsroot)\n \
* No NFS server is running or you do not have permissions"
init_ldcfg=" Starting ldconfig - normally switched off. Enable it via kernel \
cmdline option\n 'noldsc'. You might have/want to add additional library \