diff options
author | erdgeist <erdgeist@erdgeist.org> | 2006-04-12 19:28:02 +0000 |
---|---|---|
committer | erdgeist <erdgeist@erdgeist.org> | 2006-04-12 19:28:02 +0000 |
commit | 2cbc60523afcf69accad29fcfb80ce40f645a8a1 (patch) | |
tree | 69ab55e4013dace6b3471c32e58d6c48460cdba8 | |
parent | 70db4b23223bb90e96f5e845171d74849c942345 (diff) |
Beautify list output and prepend a header row
-rwxr-xr-x | ezjail-admin | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ezjail-admin b/ezjail-admin index 509339b..e15c157 100755 --- a/ezjail-admin +++ b/ezjail-admin | |||
@@ -293,13 +293,16 @@ delete) | |||
293 | list) | 293 | list) |
294 | ezjail_list=${ezjail_list:-`rcorder ${ezjail_prefix}/etc/ezjail/*`} | 294 | ezjail_list=${ezjail_list:-`rcorder ${ezjail_prefix}/etc/ezjail/*`} |
295 | ezjail_list=`basename -a ${ezjail_list}` | 295 | ezjail_list=`basename -a ${ezjail_list}` |
296 | |||
297 | printf "%-3s %-5s %-15s %-28s %s\\n" STA JID IP Hostname "Root Directory" | ||
298 | echo "--- ----- --------------- ---------------------------- -----------------------------" | ||
296 | for jail in ${ezjail_list}; do | 299 | for jail in ${ezjail_list}; do |
297 | . ${ezjail_jailcfgs}/${jail} | 300 | . ${ezjail_jailcfgs}/${jail} |
298 | eval jail_ip=\"\$jail_${jail}_ip\" | 301 | eval jail_ip=\"\$jail_${jail}_ip\" |
299 | eval jail_hostname=\"\$jail_${jail}_hostname\" | 302 | eval jail_hostname=\"\$jail_${jail}_hostname\" |
300 | eval jail_rootdir=\"\$jail_${jail}_rootdir\" | 303 | eval jail_rootdir=\"\$jail_${jail}_rootdir\" |
301 | eval jail_image=\"\$jail_${ezjail}_image\" | 304 | eval jail_image=\"\$jail_${jail}_image\" |
302 | eval jail_crypt=\"\$jail_${ezjail}_cryptimage\" | 305 | eval jail_crypt=\"\$jail_${jail}_cryptimage\" |
303 | 306 | ||
304 | jail_id=`jls | grep "${jail_hostname}" | head -n 1 | awk {'print $1'}` | 307 | jail_id=`jls | grep "${jail_hostname}" | head -n 1 | awk {'print $1'}` |
305 | 308 | ||