#!/sbin/runscript # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { local unionfs_netmounts=$(awk '!/^[[:space:]]*#/ && $3=="unionfs" && $4 ~ /\<_netdev\>/ { print $0 }' /etc/fstab) [ -n "${unionfs_netmounts}" ] && use netmount nfsmount } start() { local unionfs_netmounts=$(awk '!/^[[:space:]]*#/ && $3=="unionfs" && $4 ~ /\<_netdev\>/ { print $0 }' /etc/fstab) if [ -z "${unionfs_netmounts}" ] ; then ewarn "No network-dependent UnionFS entries found in /etc/fstab. Skipping mounts." return 0 fi ebegin "Mounting network-dependent UnionFS filesystems" mount -at unionfs -O _netdev eend $? } stop() { ebegin "Unmounting network-dependent UnionFS filesystems" umount -at unionfs -O _netdev eend $? }