summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xezjail-admin7
1 files changed, 3 insertions, 4 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 12d7122..509339b 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -298,19 +298,18 @@ list)
298 eval jail_ip=\"\$jail_${jail}_ip\" 298 eval jail_ip=\"\$jail_${jail}_ip\"
299 eval jail_hostname=\"\$jail_${jail}_hostname\" 299 eval jail_hostname=\"\$jail_${jail}_hostname\"
300 eval jail_rootdir=\"\$jail_${jail}_rootdir\" 300 eval jail_rootdir=\"\$jail_${jail}_rootdir\"
301
302 eval jail_image=\"\$jail_${ezjail}_image\" 301 eval jail_image=\"\$jail_${ezjail}_image\"
303 eval jail_crypt=\"\$jail_${ezjail}_cryptimage\" 302 eval jail_crypt=\"\$jail_${ezjail}_cryptimage\"
304 303
305 jail_id=`jls | grep ${jail_hostname} | head -n 1 | cut -f 1` 304 jail_id=`jls | grep "${jail_hostname}" | head -n 1 | awk {'print $1'}`
306 305
307 jail_state="D" 306 jail_state="D"
308 [ "${jail_image}" ] && jail_state="I" 307 [ "${jail_image}" ] && jail_state="I"
309 [ "${jail_crypt}" ] && jail_state="C" 308 [ "${jail_crypt}" ] && jail_state="C"
310 [ "${jail_id}" ] && jail_state=${jail_state}R || jail_state=${jail_state}S 309 [ "${jail_id}" ] && jail_state=${jail_state}R || jail_state=${jail_state}S
311 [ "${jail%.*}" != "${jail}" ] && jail_state=${jail_state}N 310 [ "${jail%.*}" != "${jail}" ] && jail_state=${jail_state}N
312 311
313 printf "%-3s %-5 %-15s %-20s %-30s\\n" ${jail_state} ${jail_id:-"N/A"} ${jail_ip} ${jail_hostname} ${jail_rootdir} 312 printf "%-3s %-5s %-15s %-28s %s\\n" "${jail_state}" "${jail_id:-N/A}" "${jail_ip}" "${jail_hostname}" "${jail_rootdir}"
314 done 313 done
315 314
316 ;; 315 ;;