summaryrefslogtreecommitdiff
path: root/ezjail-admin
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2008-07-06 18:54:56 +0000
committererdgeist <erdgeist@erdgeist.org>2008-07-06 18:54:56 +0000
commitaaf34bfa996e42ed05e3c6dd107d48085f7943d4 (patch)
tree2ecd9cc577de776f53d7a11bb07bb7a39a843342 /ezjail-admin
parentf36423bf6c6c750c0dd918988c1c5d8b24c6c8d3 (diff)
Use sh\'s own line splitting algorithm instead of cut
Diffstat (limited to 'ezjail-admin')
-rwxr-xr-xezjail-admin11
1 files 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)
933 ezjail_nameprop=`pax -zn -f ${ezjail_fromarchive} prop.ezjail-\*` 933 ezjail_nameprop=`pax -zn -f ${ezjail_fromarchive} prop.ezjail-\*`
934 [ $? -eq 0 -a "${ezjail_nameprop}" ] || exerr "Error: File ${ezjail_fromarchive} is not an ezjail archive." 934 [ $? -eq 0 -a "${ezjail_nameprop}" ] || exerr "Error: File ${ezjail_fromarchive} is not an ezjail archive."
935 935
936 # Figure out, what archive believes it contains 936 # Figure out, what jail and jail enviroment archive claims to contain
937 ezjail_nameprop_safename=`echo ${ezjail_nameprop} | cut -d '-' -f 2` 937 TIFS=${IFS}; IFS=-; set - ${ezjail_nameprop}
938 938 ezjail_nameprop_safename=$2 ezjail_nameprop_hsname=$4 ezjail_nameprop_hsversion=$5 ezjail_nameprop_hscpu=$6
939 # Figure out system environment when archive was created 939 IFS=${TIFS}
940 ezjail_nameprop_hsname=`echo ${ezjail_nameprop} | cut -d '-' -f 4`
941 ezjail_nameprop_hsversion=`echo ${ezjail_nameprop} | cut -d '-' -f 5`
942 ezjail_nameprop_hscpu=`echo ${ezjail_nameprop} | cut -d '-' -f 6`
943 940
944 # Figure out current system environment 941 # Figure out current system environment
945 ezjail_hsname=$( echo -n `uname -n` | tr -c '[:alnum:].' _ ) 942 ezjail_hsname=$( echo -n `uname -n` | tr -c '[:alnum:].' _ )