summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/etc/functions
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-02-25 06:05:59 +0100
committerDirk von Suchodoletz2009-02-25 06:05:59 +0100
commit268f23ce234484ce5c6044f17f703eb0737f0ed7 (patch)
treed2cded72c5bf367b3f0d93046fe6449f6d75309b /initramfs/stage3-stuff/etc/functions
parentAdded some hints/thoughts of Volkers vbox activities ... (diff)
downloadcore-268f23ce234484ce5c6044f17f703eb0737f0ed7.tar.gz
core-268f23ce234484ce5c6044f17f703eb0737f0ed7.tar.xz
core-268f23ce234484ce5c6044f17f703eb0737f0ed7.zip
Cleaned up/restructured the mounting of fs components (function
fsmount), removed creation of /dev/rtc (as it is a moving target in newer distros (25N 0 instead of traditional 10 135) - solution to be found), earlier start of dbus/hal in Ubuntu. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2639 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/stage3-stuff/etc/functions')
-rw-r--r--initramfs/stage3-stuff/etc/functions42
1 files changed, 37 insertions, 5 deletions
diff --git a/initramfs/stage3-stuff/etc/functions b/initramfs/stage3-stuff/etc/functions
index 647ba2dc..84140b94 100644
--- a/initramfs/stage3-stuff/etc/functions
+++ b/initramfs/stage3-stuff/etc/functions
@@ -127,10 +127,43 @@ case "$2" in
esac
}
#############################################################################
-# load the kernel nfs module if not compiled in
-nfsmod () {
-cat /proc/filesystems | grep -q -E "[[:space:]]nfs" || \
- { modprobe ${MODPRV} nfs 2>/dev/null || error "$error_nfsmod" nonfatal; }
+# mounter for different file sources
+fsmount () {
+local proto=$1
+local server=$2
+local srcpath=$3
+local target=$4
+local mntopt=$5
+local transport
+testmkd ${target}
+case "${proto}" in
+ *nbd)
+ # TODO: to be filled in ...
+ ;;
+ lbdev)
+ # we expect the stuff on toplevel directory, filesystem type should be
+ # autodetected here ... (vmimgserv is blockdev here)
+ vmbdev=/dev/${server}
+ waitfor ${vmbdev} 20000
+ echo -e "ext2\nreiserfs\nvfat\nxfs" >/etc/filesystems
+ mount -o ro ${vmbdev} ${target} || error "$scfg_evmlm" nonfatal
+ ;;
+ nfs)
+ # we expect nfs mounts here ... check that nfs module is loaded before
+ cat /proc/filesystems | grep -q -E "[[:space:]]nfs" || \
+ { modprobe ${MODPRV} nfs 2>/dev/null || error "$error_nfsmod" nonfatal; }
+ for transport in tcp udp fail; do
+ [ $transport = "fail" ] && { error "$init_nfs" nonfatal;
+ noimg=yes; break;}
+ mount -n -t nfs -o ${mntopt},nolock,${transport} \
+ ${server}:${srcpath} ${target} && break
+ done
+ ;;
+ smb|cifs)
+ mount -n -t ${proto} -o ${mntopt},user=guest,guest \
+ //${server}/${srcpath} ${target}
+ ;;
+esac
}
#############################################################################
# configure Xen bridge xenbr0
@@ -829,7 +862,6 @@ include_in_fsroot_union () {
nfs)
# activate kernel nfs if not present, nfsroot consists now of two
# different parts
- nfsmod
root_path=$(uri_token $ROOTFS path)
nfsserver=$(uri_token $ROOTFS server)
mkdir -p /mnt/tmp/${root_path}_${union_id}