aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-05-12 17:39:52 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-05-12 17:39:52 -0300
commit89ccdde9968d89d77af5a6f0e190043cda0c717d (patch)
tree8702834b0e9cbabe84cbb9347d3ef136b19f5058
parentc5f2ce4efd3bec686576cacfe63bd1872b6c9308 (diff)
downloadhydra-89ccdde9968d89d77af5a6f0e190043cda0c717d.tar.gz
hydra-89ccdde9968d89d77af5a6f0e190043cda0c717d.tar.bz2
Adds hydra_get_fqdn_from_nodename
-rw-r--r--lib/hydra/misc14
-rwxr-xr-xshare/hydra/eyaml0
2 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
+}
diff --git a/share/hydra/eyaml b/share/hydra/eyaml
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/share/hydra/eyaml