summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2006-04-12 19:04:30 +0000
committererdgeist <erdgeist@erdgeist.org>2006-04-12 19:04:30 +0000
commit5a3021c9141e88b464eb1ca6d109d5fc376c320a (patch)
treeafad829b2fc15c6720267b9a42a1e860f8320579
parentc034198ecf29453e2f71e6abd793884712a4705d (diff)
ezjail_list now prints out a bunch more information. Docu follows.
-rwxr-xr-xezjail-admin14
1 files changed, 13 insertions, 1 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 5ccc1d9..12d7122 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -298,7 +298,19 @@ 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 printf "%-15s %-28s %s\\n" ${jail_ip} ${jail_hostname} ${jail_rootdir} 301
302 eval jail_image=\"\$jail_${ezjail}_image\"
303 eval jail_crypt=\"\$jail_${ezjail}_cryptimage\"
304
305 jail_id=`jls | grep ${jail_hostname} | head -n 1 | cut -f 1`
306
307 jail_state="D"
308 [ "${jail_image}" ] && jail_state="I"
309 [ "${jail_crypt}" ] && jail_state="C"
310 [ "${jail_id}" ] && jail_state=${jail_state}R || jail_state=${jail_state}S
311 [ "${jail%.*}" != "${jail}" ] && jail_state=${jail_state}N
312
313 printf "%-3s %-5 %-15s %-20s %-30s\\n" ${jail_state} ${jail_id:-"N/A"} ${jail_ip} ${jail_hostname} ${jail_rootdir}
302 done 314 done
303 315
304 ;; 316 ;;