handle missng name
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 26 Mar 2022 10:59:55 +0000 (21:59 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 26 Mar 2022 10:59:55 +0000 (21:59 +1100)
overlay-go
overlay-stop

index ef237fc51a836e42c46914a88295b399ec11540a..5cde886c8f9c8856c681e5d02740804ce7574226 100755 (executable)
@@ -5,10 +5,7 @@
 
 NAME="$1"
 
-if [ -z "$NAME" ] ; then
-    echo "Select subhost: $(list_running)"
-    exit 0
-fi
+[ -z "$NAME" ] && echo "Select subhost: $(list_running)" && exit 0
 
 read USPID RSPID <<EOF
 $(is_live $NAME)
index 2c57c52f529610d65d8c8ddaffa5dccce6524d57..d1e89acf581b8459e5aaf7a7f06627aa3a53e440 100755 (executable)
@@ -7,11 +7,13 @@
 
 NAME="$1"
 
+[ -z "$NAME" ] && echo "Select subhost: $(list_running)" && exit 0
+
 read USPID RSPID <<EOF
 $(is_live $NAME)
 EOF
 
-[ -z "$USPID" ] && echo "$NAME i snot running" >&2 && exit 1
+[ -z "$USPID" ] && echo "$NAME is snot running" >&2 && exit 1
 
 if [ -z "$RSPID" ] ; then
     cat <<EOF >&2