diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/hydra/misc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/hydra/misc b/lib/hydra/misc index 9ffc72a..09fb3d7 100644 --- a/lib/hydra/misc +++ b/lib/hydra/misc @@ -143,3 +143,17 @@ function hydra_next_debian_release { exit 1 fi } + +# Get fqdn from nodename +function hydra_get_fqdn_from_nodename { + if [ -z "$1" ]; then + return + fi + + if echo $1 | grep -q '\.'; then + echo $1 + else + domain=`hydra $HYDRA config domain` + echo $1.$domain + fi +} |