#!/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" "" "" |