- rsync ...
Management commands:
-- add-key
- help
EOF
+
+ if [ "$NB_ADMIN" ]; then
+ cat <<EOF
+- add-key
+EOF
+ fi
exit 0
}
if [ "$1" = "-c" ]; then shift
else die "Permission denied"; fi
+ NB_ADMIN=
if [ "${1%% *}" = "user" ]; then
# Get user name encoded in ~/.ssh/authorized_keys
set -- $1
NB_USER="$2";
+ [ "$3" = "admin" ] && NB_ADMIN=1
set -- $SSH_ORIGINAL_COMMAND
fi
WVSTART Help subcommand
run_server help > log
WVPASS grep 'Target commands:' log
+WVFAIL grep 'add-key' log
WVSTART Help is printed without any arguments
run_server > log
WVPASS sed -e '/my_cool_username/q0' <&${console2[0]}
kill $console1_PID $console2_PID; wait
+WVSTART Admin sees help for admin subcommands
+admin=1 run_server help > log
+WVPASS grep 'add-key' log
+
WVSTART 'Cannot reset when somebody else is connected to console'
coproc exec_server console
sed -e '/novaboot-server: Connected/q0' <&${COPROC[0]}