File: 50-host-classes

package info (click to toggle)
fai 4.3.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,740 kB
  • sloc: perl: 5,115; sh: 4,272; makefile: 157
file content (35 lines) | stat: -rwxr-xr-x 1,144 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/bash

# assign classes to hosts

# use a list of classes for our demo machine
case $HOSTNAME in
    faiserver)
        echo "FAIBASE DEBIAN DHCPC 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";;
    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