summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:38:32 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:50:20 +0100
commite2e6f6fe07049f33cb6348780fa975162752e421 (patch)
treeb1813295411235d1297a0ed642b1346b24fdfb12 /meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
downloadpoky-e2e6f6fe07049f33cb6348780fa975162752e421.tar.gz
initial commit of Enea Linux 3.1
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh')
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
new file mode 100755
index 0000000000..af075407fd
--- /dev/null
+++ b/meta/recipes-core/initscripts/initscripts-1.0/umountnfs.sh
@@ -0,0 +1,33 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: umountnfs
4# Required-Start:
5# Required-Stop: umountfs
6# Should-Stop: $network $portmap
7# Default-Start:
8# Default-Stop: 0 6
9# Short-Description: Unmount all network filesystems
10### END INIT INFO
11
12PATH=/sbin:/bin:/usr/sbin:/usr/bin
13
14# Write a reboot record to /var/log/wtmp before unmounting
15halt -w
16
17echo "Unmounting remote filesystems..."
18
19test -f /etc/fstab && (
20
21#
22# Read through fstab line by line and unount network file systems
23#
24while read device mountpt fstype options
25do
26 if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs || test "$fstype" = cifs
27 then
28 umount -f $mountpt
29 fi
30done
31) < /etc/fstab
32
33: exit 0