Megatest

Artifact [a5c58a17c8]
Login

Artifact a5c58a17c8469414602e03407a580472e6fe55f8:


#! /bin/bash

#exits 1 when current host is not homehost.

if [[ ! -e .homehost ]]; then
    exit 0
fi

homehostname=$( host `cat .homehost` | awk '{print $NF}' | sed 's/\.$//' )
hostname=$( hostname -f )

if [[ $homehostname == $hostname ]]; then
    exit 0
fi
echo "ERROR: this host ($homehostname) is not the megatest homehost ($hostname)"
exit 1