From 7deaa76bfaedd9e7fedfeeafff2f9e970de24f3e Mon Sep 17 00:00:00 2001 From: miljenko Date: Fri, 14 Sep 2007 07:45:10 +0000 Subject: [PATCH] "default" is removed from the list of vimages as "vimage default ..." is not allowed. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- himage | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/himage b/himage index 9542608..8e75711 100755 --- a/himage +++ b/himage @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/sh help() { cat <<__END__ @@ -17,7 +17,7 @@ __END__ } vi_name() { - all=`vimage -l | grep -v "^ " | tr -d ':"'` + all=`vimage -l | grep -v "^ " | tr -d ':"' | grep -v '^default$'` for image in $all; do hname=`vimage $image hostname` if test $hname = $1; then @@ -62,7 +62,7 @@ elif test $1 = "-l"; then else exec vimage -l fi -elif test $1 != "-.*"; then +elif test `expr a$1 : "a-.*"` = "0"; then hname=$1 image_name=`vi_name $hname` if [ $? -ne 0 ]; then @@ -70,5 +70,8 @@ elif test $1 != "-.*"; then fi shift 1 exec vimage $image_name $* +else + echo $0: illegal option -- $1 + help fi -- 2.39.5