mountpoint – see if a directory is a mountpoint

Mountpoint checks if the directory is a mountpoint.

$mountpoint /
/ is a mountpoint
$echo $?
0
$mountpoint /dev/
/dev/ is a mountpoint
$echo $?
0
$mountpoint /media/
/media/ is not a mountpoint
$echo $?
1
$mountpoint /store/
/store/ is not a mountpoint
$echo $?
1
$mountpoint /etc/
/etc/ is not a mountpoint
$echo $?
1
$mountpoint /sys/
/sys/ is a mountpoint
$echo $?
0
$mountpoint /sys/fs/cgroup/cpuset/
/sys/fs/cgroup/cpuset/ is a mountpoint
$echo $?
0
$