summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2007-08-01 17:44:23 +0200
committerDirk von Suchodoletz2007-08-01 17:44:23 +0200
commitc134e0c3d4896d87397ffa7348175aa221c74e79 (patch)
treefb24b8476c0492fd7f9ae1f85f00da743f9711c9 /initramfs
parentMore for local device startup ... (see r1296) (diff)
downloadcore-c134e0c3d4896d87397ffa7348175aa221c74e79.tar.gz
core-c134e0c3d4896d87397ffa7348175aa221c74e79.tar.xz
core-c134e0c3d4896d87397ffa7348175aa221c74e79.zip
... add option/proto for file=... to use some local source for ConfTGZ,
see r1296, r1297 too. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1298 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r--initramfs/initrd-stuff/etc/functions18
-rw-r--r--initramfs/initrd-stuff/etc/messages3
2 files changed, 16 insertions, 5 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index 34b1cd27..ab28765d 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -329,8 +329,6 @@ echo "dhcp finished at $(sysup)" > /tmp/dhcp-done
unpack () {
# $1 is config file name to get, $2 IP of server to get file from
local dst=$1
-echo "unpacking $dst" >>/tmp/fileblub
-ls -al $dst >>/tmp/fileblub
if [ -s $dst ] ; then
# fixme: handle different types of packaging (gzip/bzip2)??
if ! tar -xpzf $dst 2> /tmp/ConfTGZ-tar-error ; then
@@ -346,16 +344,26 @@ fi
}
fileget () {
# get type of tftp available, alternatively use wget for ftp or http
+# if local device file is specified - mount and unmount after copying
local cfgfile
-echo "$fileprot $filepath $filepath" > /tmp/fileblub
[ "x$fileprot" = "x" ] && fileprot=tftp
if [ "x$filepath" != "x" ] ; then
cfgfile=${filepath}
[ "x$fileserv" = "x" ] && fileserv=$(checkip ${serverip})
case "$fileprot" in
ftp|http)
- wget $fileprot://$fileserv/$cfgfile -O /tmp/$(basename $cfgfile) \
- 2>/dev/null && { unpack /tmp/$(basename $cfgfile) && break; }
+ wget $fileprot://$fileserv/$cfgfile -O /tmp/$(basename $cfgfile) \
+ 2>/dev/null && { unpack /tmp/$(basename $cfgfile) && break; }
+ ;;
+ file)
+ local ldev=$fileserv
+ echo "Waiting for /dev/$ldev ...."
+ waitfor /dev/$ldev 10000
+ mkdir /tmp/$ldev
+ echo -e "ext2\nreiserfs\nvfat\nxfs" >/etc/filesystems
+ mount /dev/$ldev /tmp/$ldev || error "$init_errlfg"
+ unpack $cfgfile
+ umount /dev/$ldev
;;
*)
tftp -g -r $cfgfile -l /tmp/$(basename $cfgfile) $fileserv \
diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages
index 74346bcd..b469ca55 100644
--- a/initramfs/initrd-stuff/etc/messages
+++ b/initramfs/initrd-stuff/etc/messages
@@ -105,6 +105,9 @@ init_infldcfg=" You decided not to recreate \
after this file was created on server."
init_errcfg="of this client did not finish in\n time. You might check the \
process list and list the modules loaded until\n now."
+init_errlfg=" The ConfTGZ filesource was some local device which was not \
+mounted successfully.\n Either the wrong device was given or the filesystem \
+is not known to the kernel."
init_errhw=" For some reason the hardware autoconfig $init_errcfg"
init_errxorg=" For some reason no xorg.conf appeared"
init_errsw=" For some reason the software configuration $init_errcfg"