summaryrefslogtreecommitdiff
path: root/share/hydra/eyaml
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydra/eyaml')
-rwxr-xr-xshare/hydra/eyaml13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/hydra/eyaml b/share/hydra/eyaml
index efd0c41..9e75133 100755
--- a/share/hydra/eyaml
+++ b/share/hydra/eyaml
@@ -21,10 +21,23 @@ source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
# Parameters
+BASENAME="`basename $0`"
NODE="$1"
FQDN="`hydra_get_fqdn_from_nodename $NODE`"
shift
+# Check for eyaml
+if ! which eyaml &> /dev/null; then
+ echo "Please install ruby-eyaml"
+ exit 1
+fi
+
+# Check for node
+if [ -z "$NODE" ]; then
+ echo "usage: hydra $HYDRA $BASENAME <node> <opts>"
+ exit 1
+fi
+
# Ensure keystore exists
mkdir -p $HYDRA_FOLDER/keys/$FQDN/eyaml