Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 508574
Collapse All | Expand All

(-)a/init.d/netmount.in (-47 / +47 lines)
Lines 17-38 depend() Link Here
17
17
18
start()
18
start()
19
{
19
{
20
	local x= fs= rc=
20
	local rc=
21
	for x in $net_fs_list $extra_net_fs_list; do
22
		case "$x" in
23
			nfs|nfs4)
24
			continue
25
			;;
26
		esac
27
		fs="$fs${fs:+,}$x"
28
	done
29
30
	ebegin "Mounting network filesystems"
21
	ebegin "Mounting network filesystems"
31
	mount -at $fs
32
	rc=$?
33
	if [ "$RC_UNAME" = Linux ]; then
22
	if [ "$RC_UNAME" = Linux ]; then
34
		mount -a -O _netdev
23
		mount -a -O _netdev
35
		rc=$?
24
		rc=$?
25
	else
26
		local x= fs=
27
		for x in $net_fs_list $extra_net_fs_list; do
28
			case "$x" in
29
				nfs|nfs4)
30
				continue
31
				;;
32
			esac
33
			fs="$fs${fs:+,}$x"
34
		done
35
		mount -at $fs
36
		rc=$?
36
	fi
37
	fi
37
	ewend $rc "Could not mount all network filesystems"
38
	ewend $rc "Could not mount all network filesystems"
38
	return 0
39
	return 0
Lines 40-84 start() Link Here
40
41
41
stop()
42
stop()
42
{
43
{
43
	local x= fs=
44
45
	ebegin "Unmounting network filesystems"
44
	ebegin "Unmounting network filesystems"
46
	. "$RC_LIBEXECDIR"/sh/rc-mount.sh
47
48
	for x in $net_fs_list $extra_net_fs_list; do
49
		case "$x" in
50
			nfs|nfs4)
51
				continue
52
				;;
53
			*)
54
				fs="$fs${fs:+,}$x"
55
				;;
56
		esac
57
	done
58
	if [ -n "$fs" ]; then
59
		umount -at $fs || eerror "Failed to simply unmount filesystems"
60
	fi
61
62
	eindent
63
	fs=
64
	for x in $net_fs_list $extra_net_fs_list; do
65
		case "$x" in
66
			nfs|nfs4)
67
				continue
68
				;;
69
			*)
70
				fs="$fs${fs:+|}$x"
71
				;;
72
		esac
73
	done
74
	[ -n "$fs" ] && fs="^($fs)$"
75
	do_unmount umount ${fs:+--fstype-regex} $fs --netdev
76
	retval=$?
77
78
	eoutdent
79
	if [ "$RC_UNAME" = Linux ]; then
45
	if [ "$RC_UNAME" = Linux ]; then
80
		umount -a -O _netdev
46
		umount -a -O _netdev
81
		retval=$?
47
		retval=$?
48
	else
49
		local x= fs=
50
		. "$RC_LIBEXECDIR"/sh/rc-mount.sh
51
52
		for x in $net_fs_list $extra_net_fs_list; do
53
			case "$x" in
54
				nfs|nfs4)
55
					continue
56
					;;
57
				*)
58
					fs="$fs${fs:+,}$x"
59
					;;
60
			esac
61
		done
62
		if [ -n "$fs" ]; then
63
			umount -at $fs || eerror "Failed to simply unmount filesystems"
64
		fi
65
66
		eindent
67
		fs=
68
		for x in $net_fs_list $extra_net_fs_list; do
69
			case "$x" in
70
				nfs|nfs4)
71
					continue
72
					;;
73
				*)
74
					fs="$fs${fs:+|}$x"
75
					;;
76
			esac
77
		done
78
		[ -n "$fs" ] && fs="^($fs)$"
79
		do_unmount umount ${fs:+--fstype-regex} $fs --netdev
80
		retval=$?
81
		eoutdent
82
	fi
82
	fi
83
	eend $retval "Failed to unmount network filesystems"
83
	eend $retval "Failed to unmount network filesystems"
84
}
84
}

Return to bug 508574