remaster/src/func/chroot_is_mounted
2018-05-11 00:04:02 +02:00

23 lines
409 B
Bash
Executable File

#!/bin/bash
#remaster lib
[ -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
}
#this func is standalone executable
[ -n "$1" ] && {
chroot_is_mounted $@
}