summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin7
1 files changed, 6 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index aa7b16d..a4e50e1 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -120,7 +120,12 @@ fetchjailinfo () {
120 if [ -n "${ezjail_image}" -a -L "${ezjail_rootdir}.device" ]; then 120 if [ -n "${ezjail_image}" -a -L "${ezjail_rootdir}.device" ]; then
121 # Fetch destination of soft link 121 # Fetch destination of soft link
122 ezjail_device=`stat -f "%Y" ${ezjail_rootdir}.device` 122 ezjail_device=`stat -f "%Y" ${ezjail_rootdir}.device`
123 [ -e "${ezjail_device}" ] && ezjail_attached="YES" 123
124 mount -p -v | grep -q -E "^${ezjail_rootdir}.device.${ezjail_rootdir}" && ezjail_attached="YES"
125 mount -p -v | grep -q -E "^${ezjail_device}.${ezjail_rootdir}" && ezjail_attached="YES"
126
127 # Stale device link detected. Remove and clean.
128 [ -z "${ezjail_attached}" ] && unset ezjail_device && rm -f ${ezjail_rootdir}.device
124 fi 129 fi
125 130
126 [ -f /var/run/jail_${ezjail_safename}.id ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return 131 [ -f /var/run/jail_${ezjail_safename}.id ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return