49fa2fa6dda7cbf738f60c2a56792bec759d8e9f
3 # assign classes to hosts based on their hostname
6 # 51-multi-boot should have something like this
7 # for transient host configs which are not saved in
8 # git (and make it executable):
10 # if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
12 # frodo) echo STABLE ;;
17 # do not use this if a menu will be presented
18 [ "$flag_menu" ] && exit 0
21 # For multi-boot system.
22 # Check that we aren't in a pxe boot environment.
23 # There is probably a better way to do this.
24 # We check the reverse condition in 51-multi-boot,
25 # and set what os we are installing, but don't check it
26 # into git since it changes regularly. Each host needs
27 # to have a class of either DEBIAN + (STABLE or STRETCH64),
28 # or UBUNTU + XENIAL64.
30 # It's shell looks like this:
31 # if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
33 # tp) DEBIAN STABLE ;;
34 # # add more multi-boot hostnames here
38 if [[ -e /a
/bin
/fai
/fai-wrapper
]] && isdebian-stable
; then
42 # use a list of classes for our demo machine
43 echo "FAIBASE PARTITION_PROMPT"
46 echo "DEBIAN_NON_FREE"
47 if [[ -e /a
/bin
/fai
/fai-wrapper
]] && isdebian-stable
; then
48 echo "STABLE_NON_FREE"
52 echo "LINODESTABLE" ;;
55 if grep ^
52:54:00: /sys
/class
/net
/eth
0/address
&>/dev
/null
; then
56 # if our eth0 mac is in the kvm range, we are a vm.