fixup initial faiserver bootstrap & small bugs
[automated-distro-installer] / fai / config / class / 50-host-classes
index 7b23f85a27d82f735f0521d518a24c2a37b0132d..b623f8893ee62fb47152726a1a18d8db1b92b72b 100755 (executable)
@@ -2,6 +2,18 @@
 
 # assign classes to hosts based on their hostname
 
+# NOTE:
+# 51-multi-boot should have something like this
+# for transient host configs which are not saved in
+# git (and make it executable):
+
+# if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
+#     case $HOSTNAME in
+#     frodo) echo STABLE ;;
+#     esac
+# fi
+
+
 # do not use this if a menu will be presented
 [ "$flag_menu" ] && exit 0
 
@@ -10,16 +22,30 @@ echo "FAIBASE DEBIAN"
 case $HOSTNAME in
     demohost)
         echo "DESKTOP" ;;
-    tp|frodo|treetowl|x2)
+    tp)
         echo "DESKTOP PARTITION_PROMPT"
-        # non-portable way to see that we aren't in a pxe boot environment.
-        if [[ -e /a/bin/fai/fai-wrapper ]]; then
-            # We check the reverse condition in 51-multi-boot,
-            # and set what os we are installing, but don't check it
-            # into git since it changes regularly.
-            if isdebian-stable; then
-                echo "STABLE"
-            fi
+        # For multi-boot system.
+        # Check that we aren't in a pxe boot environment.
+        # There is probably a better way to do this.
+        # We check the reverse condition in 51-multi-boot,
+        # and set what os we are installing, but don't check it
+        # into git since it changes regularly.
+        # It's shell looks like this:
+        # if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
+        #     case $HOSTNAME in
+        #         tp) : ;;
+        #         # add more multi-boot hostnames here
+        #     esac
+        # fi
+        #
+        if [[ -e /a/bin/fai/fai-wrapper ]] && isdebian-stable; then
+            echo "STABLE"
+        fi
+        ;;
+    x2|frodo|treetowl)
+        echo "NON_FREE"
+        if [[ -e /a/bin/fai/fai-wrapper ]] && isdebian-stable; then
+            echo "STABLE STABLE_NON_FREE"
         fi
         ;;
     lj)