From aaf34bfa996e42ed05e3c6dd107d48085f7943d4 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sun, 6 Jul 2008 18:54:56 +0000 Subject: Use sh\'s own line splitting algorithm instead of cut --- ezjail-admin | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ezjail-admin b/ezjail-admin index fd35abe..b960044 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -933,13 +933,10 @@ restore) ezjail_nameprop=`pax -zn -f ${ezjail_fromarchive} prop.ezjail-\*` [ $? -eq 0 -a "${ezjail_nameprop}" ] || exerr "Error: File ${ezjail_fromarchive} is not an ezjail archive." - # Figure out, what archive believes it contains - ezjail_nameprop_safename=`echo ${ezjail_nameprop} | cut -d '-' -f 2` - - # Figure out system environment when archive was created - ezjail_nameprop_hsname=`echo ${ezjail_nameprop} | cut -d '-' -f 4` - ezjail_nameprop_hsversion=`echo ${ezjail_nameprop} | cut -d '-' -f 5` - ezjail_nameprop_hscpu=`echo ${ezjail_nameprop} | cut -d '-' -f 6` + # Figure out, what jail and jail enviroment archive claims to contain + TIFS=${IFS}; IFS=-; set - ${ezjail_nameprop} + ezjail_nameprop_safename=$2 ezjail_nameprop_hsname=$4 ezjail_nameprop_hsversion=$5 ezjail_nameprop_hscpu=$6 + IFS=${TIFS} # Figure out current system environment ezjail_hsname=$( echo -n `uname -n` | tr -c '[:alnum:].' _ ) -- cgit v1.2.3