From c95e27fc2f3847f6f80d74c55f268235ab1c9fcc Mon Sep 17 00:00:00 2001
From: erdgeist <erdgeist@erdgeist.org>
Date: Wed, 13 Nov 2013 16:12:15 +0000
Subject: Fix grepping for jid. This did not work for jids over 99999. Thanks
 to Mathieu Arnold

---
 ezjail-admin | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ezjail-admin b/ezjail-admin
index 27aedb8..8330d01 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -261,7 +261,7 @@ fetchjailinfo () {
   fi
 
   [ -f "/var/run/jail_${ezjail_safename}.id" ] && ezjail_id=`cat /var/run/jail_${ezjail_safename}.id` || return
-  jls | grep -q -E "^ +${ezjail_id} " || unset ezjail_id
+  jls | grep -q -E "^ *${ezjail_id} " || unset ezjail_id
 }
 
 # fill the base jail - this function is used by install and update
-- 
cgit v1.2.3