aboutsummaryrefslogtreecommitdiff
path: root/sh/rc-functions.sh
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-10-09 15:33:05 +0000
committerRoy Marples <roy@marples.name>2007-10-09 15:33:05 +0000
commitdc0ba7ebf3109b2bbdd73c5f0a411ba6129c2daf (patch)
tree2786be756e7ab35af0802eeea2f79820b2f4e7ff /sh/rc-functions.sh
parente89805e0c06792c58c19e47f99ab6379d69a2149 (diff)
netmount, localmount, halt.sh and net scripts now check OS specific flags to see if a mount is network mounted (linux = fstab, *bsd = "local" in mount options) or not, #192772.
Diffstat (limited to 'sh/rc-functions.sh')
-rwxr-xr-xsh/rc-functions.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/sh/rc-functions.sh b/sh/rc-functions.sh
index 0e149432..c3f60dd7 100755
--- a/sh/rc-functions.sh
+++ b/sh/rc-functions.sh
@@ -26,6 +26,11 @@ stop_addon() {
is_net_fs() {
[ -z "$1" ] && return 1
+ # Check OS specific flags to see if we're local or net mounted
+ mountinfo --quiet --netdev "$1" && return 0
+ mountinfo --quiet --nonetdev "$1" && return 1
+
+ # Fall back on fs types
local t=$(mountinfo --fstype "$1")
for x in ${RC_NET_FS_LIST}; do
[ "${x}" = "${t}" ] && return 0