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.

This commit is contained in:
Roy Marples
2007-10-09 15:33:05 +00:00
parent e89805e0c0
commit dc0ba7ebf3
7 changed files with 111 additions and 46 deletions

View File

@@ -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