summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh83
1 files changed, 83 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
new file mode 100755
index 0000000000..46c58b16a8
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/mountnfs.sh
@@ -0,0 +1,83 @@
1### BEGIN INIT INFO
2# Provides: mountnfs
3# Required-Start: $local_fs $network $portmap
4# Required-Stop:
5# Default-Start: S
6# Default-Stop:
7### END INIT INFO
8
9. /etc/default/rcS
10
11#
12# Run in a subshell because of I/O redirection.
13#
14test -f /etc/fstab && (
15
16#
17# Read through fstab line by line. If it is NFS, set the flag
18# for mounting NFS filesystems. If any NFS partition is found and it
19# not mounted with the nolock option, we start the portmapper.
20#
21portmap=no
22mount_nfs=no
23mount_smb=no
24mount_ncp=no
25while read device mountpt fstype options
26do
27 case "$device" in
28 ""|\#*)
29 continue
30 ;;
31 esac
32
33 case "$options" in
34 *noauto*)
35 continue
36 ;;
37 esac
38
39 if test "$fstype" = nfs
40 then
41 mount_nfs=yes
42 case "$options" in
43 *nolock*)
44 ;;
45 *)
46 portmap=yes
47 ;;
48 esac
49 fi
50 if test "$fstype" = smbfs
51 then
52 mount_smb=yes
53 fi
54 if test "$fstype" = ncpfs
55 then
56 mount_ncp=yes
57 fi
58done
59
60exec 0>&1
61
62if test "$portmap" = yes
63then
64 if test -x /sbin/portmap
65 then
66 echo -n "Starting portmapper... "
67 start-stop-daemon --start --quiet --exec /sbin/portmap
68 sleep 2
69 fi
70fi
71
72if test "$mount_nfs" = yes || test "$mount_smb" = yes || test "$mount_ncp" = yes
73then
74 echo "Mounting remote filesystems..."
75 test "$mount_nfs" = yes && mount -a -t nfs
76 test "$mount_smb" = yes && mount -a -t smbfs
77 test "$mount_ncp" = yes && mount -a -t ncpfs
78fi
79
80) < /etc/fstab
81
82: exit 0
83