#! /bin/bash

# assign classes to hosts based on their hostname

# do not use this if a menu will be presented
[ "$flag_menu" ] && exit 0

# use a list of classes for our demo machine
case $HOSTNAME in
    faiserver)
        echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
    demohost|client*)
        echo "FAIBASE DEBIAN DEMO" ;;
    xfcehost)
        echo "FAIBASE DEBIAN DEMO XORG XFCE LVM";;
    gnomehost)
        echo "FAIBASE DEBIAN DEMO XORG GNOME";;
    ubuntuhost)
        echo "FAIBASE DEBIAN DEMO UBUNTU FOCAL FOCAL64 XORG";;
    centos)
        echo "FAIBASE CENTOS"   # you may want to add class XORG here
        ifclass AMD64 && echo CENTOS8_64
	;;
    slchost)
        # Scientific Linux Cern, is very similar to CentOS. SLC should alsways use the class CENTOS
        echo "FAIBASE CENTOS SLC"  # you may want to add class XORG here
        ifclass I386 && echo SLC7_32
        ifclass AMD64 && echo SLC7_64
	;;
    *)
        echo "FAIBASE DEBIAN DEMO" ;;
esac
