blob: ba65a398c5c742cb32fb480914a91a5c755a2abb [file] [log] [blame]
#!/bin/bash
[ -f testing.sh ] && . testing.sh
#testing "name" "command" "result" "infile" "stdin"
HOST="$(cat /proc/sys/kernel/hostname)"
testing "get" "hostname" "$HOST\n" "" ""
if [ "$(id -u)" -ne 0 ]
then
echo "$SHOWSKIP: groupdel (not root)"
return 2>/dev/null
exit
fi
testing "set" 'hostname "2>&1 | tee"; hostname; hostname "$HOST"' "2>&1 | tee\n" "" ""