remaster/src/func/chroot_is_mounted

23 lines
368 B
Plaintext
Raw Normal View History

#!/bin/bash
#remaster lib
2018-05-07 00:56:46 +00:00
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
#chroot_is_mounted [chroot_dir]
#(Boolean)-> true | false
function chroot_is_mounted() {
#$1 = chroot directory
if [ "`mount | grep "$1"`" != "" ] ; then
#ther is smething mounted
echo "true"
else
#nothing mounted
echo "false"
fi
}
2018-05-10 15:13:19 +00:00
[ -n "$1" ] && {
echo param
$1
}