Hydra
-----
- - Provision: wrapper for "hydractl provision" with stores/uses node configuration.
- Bootless: properly support $subdevice in parted or always use first device (like /dev/sdb1).
# Parameters
NODE="$1"
-CONFIG="$HYDRA_FOLDER/config/provision/$NODE"
+CONFIG="$HYDRA_FOLDER/config/provision"
+
+# Ensure config folder exists
+mkdir -p $CONFIG
+
+# Syntax
+if [ -z "$NODE" ]; then
+ echo "Available configurations:"
+ ( cd $CONFIG && tree )
+ exit 1
+fi
# Provision
-if [ -e "$CONFIG" ]; then
- hydractl provision $CONFIG
+if [ -e "$CONFIG/$NODE.conf" ]; then
+ hydractl provision $CONFIG/$NODE.conf
fi