From 1e83b5df834a2629aaabaee7f21560d9e28bf7d9 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Mon, 3 Apr 2006 14:52:12 +0000 Subject: 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 --- initrd/initrd-stuff/etc/functions | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'initrd/initrd-stuff/etc/functions') 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 , 23-03-2006 +# Author(s): Dirk von Suchodoletz , 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) -- cgit v1.2.3-55-g7522