File: 50-host-classes

package info (click to toggle)
fai 6.5.1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,084 kB
  • sloc: sh: 6,774; perl: 5,665; makefile: 138
file content (26 lines) | stat: -rwxr-xr-x 706 bytes parent folder | download | duplicates (3)
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
#! /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 NOBLE NOBLE64 XORG";;
    rocky)
        echo "FAIBASE ROCKY"   # you may want to add class XORG here
        ifclass AMD64 && echo ROCKY9_64
	;;
    *)
        echo "FAIBASE DEBIAN DEMO" ;;
esac