* Support NFS mounts.

svn path=/nixos/trunk/; revision=7615
This commit is contained in:
Eelco Dolstra 2007-01-10 14:34:31 +00:00
parent 774a0a397c
commit a7644b8855
1 changed files with 8 additions and 3 deletions

View File

@ -44,7 +44,10 @@ script
isLabel= isLabel=
if echo \"$device\" | grep -q '^LABEL='; then isLabel=1; fi if echo \"$device\" | grep -q '^LABEL='; then isLabel=1; fi
if ! test -n \"$isLabel\" -o -e \"$device\"; then isPseudo=
if test \"$fsType\" = \"nfs\"; then isPseudo=1; fi
if ! test -n \"$isLabel\" -o -n \"$isPseudo\" -o -e \"$device\"; then
echo \"skipping $device, doesn't exist (yet)\" echo \"skipping $device, doesn't exist (yet)\"
continue continue
fi fi
@ -54,7 +57,7 @@ script
# contains more accurate info when using loop devices. # contains more accurate info when using loop devices.
# !!! not very smart about labels yet; should resolve the label somehow. # !!! not very smart about labels yet; should resolve the label somehow.
if test -z \"$isLabel\"; then if test -z \"$isLabel\" -a -z \"$isPseudo\"; then
device=$(readlink -f \"$device\") device=$(readlink -f \"$device\")
@ -82,7 +85,9 @@ script
echo \"mounting $device on $mountPoint\" echo \"mounting $device on $mountPoint\"
# !!! should do something with the result; also prevent repeated fscks. # !!! should do something with the result; also prevent repeated fscks.
fsck -a \"$device\" || true if test -z \"$isPseudo\"; then
fsck -a \"$device\" || true
fi
if ${utillinux}/bin/mount -t \"$fsType\" -o \"$options\" \"$device\" \"$mountPoint\"; then if ${utillinux}/bin/mount -t \"$fsType\" -o \"$options\" \"$device\" \"$mountPoint\"; then
newDevices=1 newDevices=1