summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xezjail-admin16
1 files changed, 8 insertions, 8 deletions
diff --git a/ezjail-admin b/ezjail-admin
index 443ee09..b2904d0 100755
--- a/ezjail-admin
+++ b/ezjail-admin
@@ -593,7 +593,7 @@ delete)
593 rm -f "${ezjail_config}" "/etc/fstab.${ezjail_safename}" 593 rm -f "${ezjail_config}" "/etc/fstab.${ezjail_safename}"
594 594
595 # if there is a soft link pointing to the jail root, remove it 595 # if there is a soft link pointing to the jail root, remove it
596 [ -L "${ezjail_softlink}" ] && rm "${ezjail_softlink}" 596 [ -L "${ezjail_softlink}" ] && rm -f "${ezjail_softlink}"
597 597
598 # if wiping the jail was requested, remove it 598 # if wiping the jail was requested, remove it
599 if [ "${ezjail_wipeme}" ]; then 599 if [ "${ezjail_wipeme}" ]; then
@@ -952,11 +952,11 @@ restore)
952 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails." 952 [ "${ezjail_hscpu}" != "${ezjail_nameprop_hscpu}" ] && exerr "Error: Archive was created on a different CPU. Can not restore. Consider using \"ezjail-admin create -a\" when migrating ezjails."
953 953
954 # Save config to tempfile and source it 954 # Save config to tempfile and source it
955 tmpfile=`mktemp /tmp/ezjail.prop.XXXXXXXX` 955 ezjail_tmpfile=`mktemp /tmp/ezjail.prop.XXXXXXXX`
956 [ $? -ne 0 ] && exerr "Error: Can't create temporary file." 956 [ $? -ne 0 ] && exerr "Error: Can't create temporary file."
957 pax -rzn -s:${ezjail_nameprop}:${tmpfile}: -f ${ezjail_fromarchive} ${ezjail_nameprop} 957 pax -rzn -s:${ezjail_nameprop}:${ezjail_tmpfile}: -f ${ezjail_fromarchive} ${ezjail_nameprop}
958 . "${tmpfile}" 958 . "${ezjail_tmpfile}"
959 rm -f "${tmpfile}" 959 rm -f "${ezjail_tmpfile}"
960 960
961 shift 1 961 shift 1
962 done 962 done
@@ -1046,7 +1046,7 @@ config)
1046 1046
1047 # adjust softlink 1047 # adjust softlink
1048 if [ -L "${ezjail_softlink}" ]; then 1048 if [ -L "${ezjail_softlink}" ]; then
1049 rm "${ezjail_softlink}" 1049 rm -f "${ezjail_softlink}"
1050 ln -s "${ezjail_new_rootdir}" "${ezjail_new_softlink}" 1050 ln -s "${ezjail_new_rootdir}" "${ezjail_new_softlink}"
1051 fi 1051 fi
1052 1052
@@ -1058,7 +1058,7 @@ config)
1058 [ "${ezjail_new_imagetype}" ] && \ 1058 [ "${ezjail_new_imagetype}" ] && \
1059 echo ${ezjail_new_rootdir}.device ${ezjail_new_rootdir} ufs rw 0 0 >> "/etc/fstab.${ezjail_new_safename}" 1059 echo ${ezjail_new_rootdir}.device ${ezjail_new_rootdir} ufs rw 0 0 >> "/etc/fstab.${ezjail_new_safename}"
1060 echo ${ezjail_jailbase} ${ezjail_new_rootdir}/basejail nullfs ro 0 0 >> "/etc/fstab.${ezjail_new_safename}" 1060 echo ${ezjail_jailbase} ${ezjail_new_rootdir}/basejail nullfs ro 0 0 >> "/etc/fstab.${ezjail_new_safename}"
1061 rm "/etc/fstab.${ezjail_safename}" 1061 rm -f "/etc/fstab.${ezjail_safename}"
1062 1062
1063 # rename config file, preserve comments 1063 # rename config file, preserve comments
1064 ( 1064 (
@@ -1081,7 +1081,7 @@ config)
1081 ) > "${ezjail_new_config}" 1081 ) > "${ezjail_new_config}"
1082 1082
1083 # remove old config 1083 # remove old config
1084 rm "${ezjail_config}" 1084 rm -f "${ezjail_config}"
1085 1085
1086 # usually that doesnt go smoothly, but the user wanted it 1086 # usually that doesnt go smoothly, but the user wanted it
1087 # that way ;) 1087 # that way ;)