From 76c2b21f0000d5f12c43723f9b816837c4cb801e Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 5 Apr 2011 09:17:54 +0000 Subject: Add -U in the getopts line. Only one = in a [ test. --- ezjail-admin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ezjail-admin') diff --git a/ezjail-admin b/ezjail-admin index 5f7fcdc..887fabf 100755 --- a/ezjail-admin +++ b/ezjail-admin @@ -839,7 +839,7 @@ setup|update) # Clean variables, prevent polution unset ezjail_provideports ezjail_installaction ezjail_osversion_source ezjail_osversion_destination - shift; while getopts :biupPs: arg; do case ${arg} in + shift; while getopts :biuUpPs: arg; do case ${arg} in b) ezjail_installaction="buildworld installworld";; i) ezjail_installaction="installworld";; u) ezjail_installaction="freebsd-update";; @@ -871,7 +871,7 @@ setup|update) [ -z "$TERM" -o "$TERM" = "dumb" ] && ezjail_urgency="cron" || ezjail_urgency="fetch" [ "${ezjail_use_zfs}" = "YES" ] && zfs snapshot ${ezjail_jailzfs}/basejail@`date -v -7d +"%C%y%m%d_%H:%M:%S"` freebsd-update -b ${ezjail_jailbase} ${ezjail_urgency} install - elif [ "${ezjail_installaction}" == "freebsd-upgrade" ]; then + elif [ "${ezjail_installaction}" = "freebsd-upgrade" ]; then [ -d "${ezjail_jailbase}" ] || exerr "Error: base jail does not exist.\n You cannot update a base jail until it is created.\n Please run '${ezjail_admin} update' or '${ezjail_admin} install' first." [ -z "${ezjail_sourcetree}" ] && exerr "Error: Can not (yet automatically) infer the basejail's osversion.\n Please run ${ezjail_admin} update -U -s X.X-RELEASE, with X.X-RELEASE being to osversion currently installed in the basejail in need of an upgrade." -- cgit v1.2.3