summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff/etc
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
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')
-rw-r--r--initrd/initrd-stuff/etc/functions16
-rw-r--r--initrd/initrd-stuff/etc/messages5
2 files changed, 14 insertions, 7 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)
diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages
index 416caa81..c7adeb3e 100644
--- a/initrd/initrd-stuff/etc/messages
+++ b/initrd/initrd-stuff/etc/messages
@@ -3,7 +3,7 @@
# version 4
# this file could be used for localization of error messages
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 02-04-2006
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-04-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -89,12 +89,13 @@ error_modnfs="needed for mounting rootfs"
error_iptool=" No tool for local IP configuration found. You should at \
least add\n one of the following programs to your ramdisk: ip \
ipconfig\n ifconfig."
-error_nfs=" Mount of root filesystem via NFS was requested via kernel command \
+error_rnfs=" 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\
* No NFS server is running or you do not have permissions"
+error_gnfs=" Mount of some NFS source failed ..."
error_portm=" Portmapper should be present, if normal mount \
command is used. Please\n check your initial ramdisk setup (mkdxsinitrd)."
error_mntt=" No suitable mount tool found."