Deleted Added
full compact
28c28
< # $FreeBSD: head/usr.sbin/bsdconfig/share/common.subr 262899 2014-03-07 20:20:27Z dteske $
---
> # $FreeBSD: head/usr.sbin/bsdconfig/share/common.subr 264840 2014-04-23 22:04:04Z dteske $
156c156
< local OPTIND flag
---
> local OPTIND OPTARG flag
800a801
> # f_mounted -b $device
802c803,805
< # Return success if a filesystem is mounted on a particular directory.
---
> # Return success if a filesystem is mounted on a particular directory. If `-b'
> # is present, instead check that the block device (or a partition thereof) is
> # mounted.
806,808c809,824
< local dir="$1"
< [ -d "$dir" ] || return $FAILURE
< mount | grep -Eq " on $dir \([^)]+\)$"
---
> local OPTIND OPTARG flag use_device=
> while getopts b flag; do
> case "$flag" in
> b) use_device=1 ;;
> esac
> done
> shift $(( $OPTIND - 1 ))
> if [ "$use_device" ]; then
> local device="$1"
> mount | grep -Eq \
> "^$device([[:space:]]|p[0-9]|s[0-9]|\.nop|\.eli)"
> else
> [ -d "$dir" ] || return $FAILURE
> mount | grep -Eq " on $dir \([^)]+\)$"
> fi
> # Return status is that of last grep(1)
893c909
< local OPTIND __flag
---
> local OPTIND OPTARG __flag