#! /bin/bash

# assign classes to hosts

# use a list of classes for our demo machine
case $HOSTNAME in
    faiserver)
        echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
    demohost|client*)
        echo "FAIBASE DEBIAN DHCPC DEMO" ;;
    xfcehost)
        echo "FAIBASE DEBIAN DHCPC DEMO XORG XFCE";;
    gnomehost)
        echo "FAIBASE DEBIAN DHCPC DEMO XORG GNOME";;
    atom*)
        echo "FAIBASE DEBIAN DHCPC DEMO" ;;
    bear)
        echo "FAIBASE DEBIAN DHCPC LVM_XEN_SERVER XEN" ;;
    puma)
        echo "FAIBASE DEBIAN DHCPC RAID_XEN_VIRTUAL" ;;
    centos)
        echo "FAIBASE CENTOS"   # you may want to add class XORG here
        ifclass I386 && echo CENTOS6_32
        ifclass AMD64 && echo CENTOS6_64
        exit 0 ;; # CentOS does not use the GRUB class
    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 SLC6_32
        ifclass AMD64 && echo SLC6_64
        exit 0 ;; # CentOS/SLC does not use the GRUB class
    *)
        echo "FAIBASE DEBIAN DHCPC" ;;
esac

ifclass -o I386 AMD64 && echo GRUB_PC
exit 0
