update upstream to 9084a3cbc0a55422beea4a55b530c1f03a910617 feb 2024
[automated-distro-installer] / fai / config / class / 10-base-classes
index eed0846e2e8f47971a78361847abc0f6280cc1d6..e4408b658070e2e7911be2164446cc3f46eba9de 100755 (executable)
@@ -1,8 +1,12 @@
 #! /bin/bash
 
-# Echo architecture and OS name in uppercase. Do NOT remove these two lines.
-uname -s | tr '[:lower:]' '[:upper:]'
-[ -x "`which dpkg`" ] && dpkg --print-architecture | tr a-z A-Z
+# do only execute if this is called on the client being installed. Do not use during fai-diskimage
+if [ X$FAI_ACTION = Xinstall -a $do_init_tasks -eq 0 ]; then
+    exit 0
+fi
+
+# Echo architecture
+command -v dpkg >&/dev/null && dpkg --print-architecture | tr a-z A-Z
 
 # determin if we are a DHCP client or not
 # count the : chars in the argument of ip=