mirror of
https://codeberg.org/scip/jaildk.git
synced 2025-12-18 13:11:02 +01:00
added check
This commit is contained in:
20
jaildk
20
jaildk
@@ -133,15 +133,19 @@ jaildk_rc_rcoff() {
|
|||||||
# not required in run mode
|
# not required in run mode
|
||||||
case $mode in
|
case $mode in
|
||||||
start)
|
start)
|
||||||
if ! test -d $j/etc/rcoff; then
|
if mount | egrep -q "rcoff.*build/$jail"; then
|
||||||
# in order to be backwards compatible to older jaildk
|
bold "union mount $j/build/jail/etc already mounted"
|
||||||
# create the rcoff directory on the fly
|
else
|
||||||
mkdir -d $j/etc/rcoff
|
if ! test -d $j/etc/rcoff; then
|
||||||
( echo "#!/bin/sh"
|
# in order to be backwards compatible to older jaildk
|
||||||
echo 'echo "$0 disabled in build chroot!"' ) > $j/etc/rcoff/rc
|
# create the rcoff directory on the fly
|
||||||
fi
|
mkdir -d $j/etc/rcoff
|
||||||
|
( echo "#!/bin/sh"
|
||||||
|
echo 'echo "$0 disabled in build chroot!"' ) > $j/etc/rcoff/rc
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user