improve host repo detection outside fai
authorIan Kelling <ian@iankelling.org>
Sun, 15 Jan 2017 17:38:03 +0000 (09:38 -0800)
committerIan Kelling <ian@iankelling.org>
Mon, 6 Feb 2017 06:21:42 +0000 (22:21 -0800)
fai/config/class/50-host-classes

index 278bcce785df60383646fa068bbbd1281b26d2b7..31f3f9a99d1ee69e9ce67f6fe3f9967dc92ed0d0 100755 (executable)
@@ -75,13 +75,18 @@ echo "FAIBASE"
 #echo REPARTITION
 
 case $HOSTNAME in
-    frodo|treetowl)
-        if [[ -e /a/bin/fai/fai-wrapper ]] && isdebian-stable; then
-            echo "STABLE_NONFREE"
+    lj|lj) echo "STABLE STABLE_LINODE" ;;
+    *)
+        if [[ -e /a/bin/fai/fai-wrapper ]] && isdebian; then
+            if isdebian-stable; then
+                # nonfree repo is not going away any time soon due to
+                # gcc-doc being in nonfree
+                echo "STABLE_NONFREE"
+            elif isdebian-testing; then
+                echo "TESTING_NONFREE"
+            fi
         fi
         ;;
-    lj|lj)
-        echo "STABLE STABLE_LINODE" ;;
 esac
 
 if grep ^52:54:00: /sys/class/net/eth0/address &>/dev/null; then