2018-04-30 18:57:01 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#remaster lib
|
2018-05-07 02:56:46 +02:00
|
|
|
[ -d "<LIBDIR>" ] || { echo "LIBDIR not exist"; exit 1; }
|
2018-04-30 18:57:01 +02:00
|
|
|
|
|
|
|
#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 17:13:19 +02:00
|
|
|
|
2018-05-11 00:04:02 +02:00
|
|
|
#this func is standalone executable
|
2018-05-10 17:13:19 +02:00
|
|
|
[ -n "$1" ] && {
|
2018-05-11 00:04:02 +02:00
|
|
|
chroot_is_mounted $@
|
2018-05-10 17:13:19 +02:00
|
|
|
}
|