summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc/functions
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-04-03 16:52:12 +0200
committerDirk von Suchodoletz2006-04-03 16:52:12 +0200
commit1e83b5df834a2629aaabaee7f21560d9e28bf7d9 (patch)
tree4224605f3e1a447e084d2fec461fefef7f35f935 /initrd/initrd-stuff/etc/functions
parentminifix and comment for installer ... (diff)
downloadcore-1e83b5df834a2629aaabaee7f21560d9e28bf7d9.tar.gz
core-1e83b5df834a2629aaabaee7f21560d9e28bf7d9.tar.xz
core-1e83b5df834a2629aaabaee7f21560d9e28bf7d9.zip
added cowdev (for cowloop device activation) to mkdxsinitrd,
generalized nfsmnt function ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@146 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff/etc/functions')
-rw-r--r--initrd/initrd-stuff/etc/functions16
1 files changed, 11 insertions, 5 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index a83f2fe0..8c8e1c8f 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -2,9 +2,8 @@
# linux diskless clients (included by init, hwautocfg,
# servconfig, ... within initial ramdisk)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-03-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-04-2006
# Felix Endres, 21-03-2006
-# Blub
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -139,10 +138,17 @@ case $ipcfg in
esac
}
#######################################################################
-# nfs mounter
+# nfs mounter for root filesystem and other sources
nfsmnt ()
{
local nfsroot=$1
+local dest=$2
+if [ -z "$dest" ] ; then
+ dest="/mnt"
+ e_nfs="$error_rnfs"
+else
+ e_nfs="$error_gnfs"
+fi
for mnt in nfsmount mount none; do
test -x /bin/$mnt && break;
done
@@ -150,11 +156,11 @@ done
loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko "$error_modnfs"
case $mnt in
nfsmount)
- nfsmount -o ro $nfsroot /mnt || error "$error_nfs"
+ nfsmount -o ro $nfsroot $dest || error "$e_nfs"
;;
mount)
portmap || error "$error_portm"
- mount -n -t nfs -o ro $nfsroot /mnt || error "$errmsg"
+ mount -n -t nfs -o ro,nolock $nfsroot $dest || error "$e_nfs"
killall -9 portmap
;;
none)