From a7644b88557645c6fd6f14ef94c3755498688868 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Jan 2007 14:34:31 +0000 Subject: [PATCH] * Support NFS mounts. svn path=/nixos/trunk/; revision=7615 --- upstart-jobs/filesystems.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/upstart-jobs/filesystems.nix b/upstart-jobs/filesystems.nix index 793bb47ba25..440d0c36d07 100644 --- a/upstart-jobs/filesystems.nix +++ b/upstart-jobs/filesystems.nix @@ -44,7 +44,10 @@ script isLabel= 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)\" continue fi @@ -54,7 +57,7 @@ script # contains more accurate info when using loop devices. # !!! 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\") @@ -82,7 +85,9 @@ script echo \"mounting $device on $mountPoint\" # !!! 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 newDevices=1