update to 5.1.2 example
[automated-distro-installer] / fai / config / hooks / setup.DEFAULT.sh
index 711fa7f766a0a56866f0643a6cfe627d6587797b..bd9c3be892f27dea8c6aeeba99e662efff430e87 100755 (executable)
@@ -2,4 +2,10 @@
 
 # use short hostname instead of FQDN
 export HOSTNAME=${HOSTNAME%%.*}
-echo $HOSTNAME > /proc/sys/kernel/hostname
+# n.b. use $action instead of $FAI_ACTION
+# as the latter is apparently unset at this point in dirinstall
+if [ "$action" = "dirinstall" ] ; then
+  :
+else
+  echo $HOSTNAME > /proc/sys/kernel/hostname
+fi