3 # assign classes to hosts based on their hostname
5 # do not use this if a menu will be presented
6 [ "$flag_menu" ] && exit 0
8 # use a list of classes for our demo machine
14 echo "DESKTOP PARTITION_PROMPT"
15 # non-portable way to see that we aren't in a pxe boot environment.
16 if [[ -e /a
/bin
/fai
/fai-wrapper
]]; then
17 # We check the reverse condition in 51-multi-boot,
18 # and set what os we are installing, but don't check it
19 # into git since it changes regularly.
20 if isdebian-stable
; then
26 echo "LINODESTABLE PARTITION_PROMPT" ;;
28 echo "LINODESTABLE PARTITION_PROMPT" ;;
30 echo "STABLE PARTITION_PROMPT" ;;
32 # echo "DEMO FAISERVER" ;;
34 # echo "DEMO XORG XFCE LVM";;
36 # echo "DEMO XORG GNOME";;
38 # echo "FAIBASE CENTOS" # you may want to add class XORG here
39 # ifclass I386 && echo CENTOS6_32 # AFAIK there's no 32bit C7
40 # ifclass AMD64 && echo CENTOS7_64
41 # exit 0 ;; # CentOS does not use the GRUB class
43 # # Scientific Linux Cern, is very similar to CentOS. SLC should alsways use the class CENTOS
44 # echo "FAIBASE CENTOS SLC" # you may want to add class XORG here
45 # ifclass I386 && echo SLC7_32
46 # ifclass AMD64 && echo SLC7_64
47 # exit 0 ;; # CentOS/SLC does not use the GRUB class
52 if grep ^
52:54:00: /sys
/class
/net
/eth
0/address
&>/dev
/null
; then
53 # if our eth0 mac is in the kvm range, we are a vm.