various improvements
[automated-distro-installer] / fai / config / class / 50-host-classes
1 #! /bin/bash
2
3 # assign classes to hosts based on their hostname
4
5 # do not use this if a menu will be presented
6 [ "$flag_menu" ] && exit 0
7
8 # use a list of classes for our demo machine
9 case $HOSTNAME in
10 demohost)
11 echo "FAIBASE DEBIAN DESKTOP" ;;
12 x2)
13 echo "FAIBASE DEBIAN DESKTOP PARTITION_PROMPT" ;;
14 tp)
15 echo "FAIBASE DEBIAN DESKTOP PARTITION_PROMPT" ;;
16 frodo)
17 echo "FAIBASE DEBIAN DESKTOP STABLE PARTITION_PROMPT" ;;
18 treetowl)
19 echo "FAIBASE DEBIAN DESKTOP STABLE PARTITION_PROMPT" ;;
20 # faiserver)
21 # echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
22 # xfcehost)
23 # echo "FAIBASE DEBIAN DEMO XORG XFCE LVM";;
24 # gnomehost)
25 # echo "FAIBASE DEBIAN DEMO XORG GNOME";;
26 # centos)
27 # echo "FAIBASE CENTOS" # you may want to add class XORG here
28 # ifclass I386 && echo CENTOS6_32 # AFAIK there's no 32bit C7
29 # ifclass AMD64 && echo CENTOS7_64
30 # exit 0 ;; # CentOS does not use the GRUB class
31 # slchost)
32 # # Scientific Linux Cern, is very similar to CentOS. SLC should alsways use the class CENTOS
33 # echo "FAIBASE CENTOS SLC" # you may want to add class XORG here
34 # ifclass I386 && echo SLC7_32
35 # ifclass AMD64 && echo SLC7_64
36 # exit 0 ;; # CentOS/SLC does not use the GRUB class
37 *)
38 echo "FAIBASE DEBIAN DESKTOP" ;;
39 esac
40
41 if grep ^52:54:00: /sys/class/net/eth0/address &>/dev/null; then
42 # if our eth0 mac is in the kvm range, we are a vm.
43 echo "VM"
44 fi