added check

This commit is contained in:
Thomas von Dein
2020-11-28 11:59:19 +01:00
parent 6456d797a2
commit b9ae99b106

4
jaildk
View File

@@ -133,6 +133,9 @@ jaildk_rc_rcoff() {
# not required in run mode # not required in run mode
case $mode in case $mode in
start) start)
if mount | egrep -q "rcoff.*build/$jail"; then
bold "union mount $j/build/jail/etc already mounted"
else
if ! test -d $j/etc/rcoff; then if ! test -d $j/etc/rcoff; then
# in order to be backwards compatible to older jaildk # in order to be backwards compatible to older jaildk
# create the rcoff directory on the fly # create the rcoff directory on the fly
@@ -142,6 +145,7 @@ jaildk_rc_rcoff() {
fi fi
ex mount -t unionfs $j/etc/rcoff $j/build/$jail/etc ex mount -t unionfs $j/etc/rcoff $j/build/$jail/etc
fi
;; ;;
stop) stop)
# might fail if executed on a yet not union'ed etc # might fail if executed on a yet not union'ed etc