You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.4 KiB

#!/usr/bin/env bash
DESC="Test de la configuration de base de bigboss et tiny."
SYSTEMS="bigboss tiny"
run() {
local localErrors=0
requireSshGuests $SYSTEMS
vdnTest "hostname bigboss ......... ?" 'vdn-ssh root@bigboss "test \"\$(hostname)\" = bigboss"'
vdnTest "ip bigboss ............... ?" 'vdn-ssh root@bigboss "ip addr show eth0 | grep -Fq 192.168.30.2"'
vdnTest "hostname tiny ............ ?" 'vdn-ssh root@tiny "test \"\$(hostname)\" = tiny"'
vdnTest "ip tiny .................. ?" 'vdn-ssh root@tiny "ip addr show eth1 | grep -Fq 192.168.30.16"'
vdnTest "ping bigboss -> tiny ..... ?" 'vdn-ssh root@bigboss "timeout 2 ping -c 1 tiny &> /dev/null"'
vdnTest "ping tiny -> bigboss .. ?" 'vdn-ssh root@tiny "timeout 2 ping -c 1 bigboss &> /dev/null"'
vdnTest "ping bigboss -> bigboss .. ?" 'vdn-ssh root@bigboss "timeout 2 ping -c 1 bigboss &> /dev/null"'
vdnTest "ping tiny -> tiny ..... ?" 'vdn-ssh root@tiny "timeout 2 ping -c 1 tiny &> /dev/null"'
vdnTest "user toto sur bigboss .... ?" 'vdn-ssh root@bigboss "id toto &> /dev/null"'
vdnTest "user titi sur tiny ....... ?" 'vdn-ssh root@tiny "id titi &> /dev/null"'
echo
vdnTest "NFS lecture seule (ro) ... ?" '
vdn-ssh root@tiny "
[ ! -d /mnt/bigboss ] && mkdir /mnt/bigboss;
timeout 3 mount bigboss:/overlays/ro/usr/share/doc /mnt/bigboss;
[ ! -e /mnt/bigboss/xterm ] && exit 1;
umount /mnt/bigboss;
"'
echoDone
return $localErrors
}