From f21f248100fd5b680418604bbc84308b38590ef4 Mon Sep 17 00:00:00 2001
From: erdgeist <erdgeist@erdgeist.org>
Date: Thu, 22 Sep 2005 18:14:43 +0000
Subject: list works in a very basic mode

---
 ezjail-admin | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'ezjail-admin')

diff --git a/ezjail-admin b/ezjail-admin
index ac12f18..ef046d2 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # ugly: this variable is set during port install time
-ezjail_prefix=EZJAIL_PREFIX
+ezjail_prefix=/usr/local
 ezjail_jailcfgs=${ezjail_prefix}/etc/ezjail
 
 if [ "0" != "`id -u`" ]; then
@@ -121,7 +121,12 @@ delete)
 
   ;;
 list)
-
+  jail_list=`ls $ezjail_jailcfgs`
+  for jail in $jail_list; do
+    . ${ezjail_jailcfgs}/$jail
+    eval jail_ip=\"\$jail_${jail}_ip\"; echo -n "$jail_ip	"
+    eval jail_hostname=\"\$jail_${jail}_hostname\"; echo $jail_hostname
+  done
   ;;
 update)
   shift
-- 
cgit v1.2.3