278bcce785df60383646fa068bbbd1281b26d2b7
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 # We 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.
27 # It's code looks like this:
28 # if [[ ! -e /a/bin/fai/fai-wrapper ]]; then
30 # tp) DEBIAN STABLE VOL_STABLE STABLE_FREE;;
31 # # add more multi-boot hostnames here
35 # Each host defines the base distro: UBUNTU or DEBIAN.
36 # the disto version, also the basefile name if we aren't installing debian stable:
37 # STABLE, STRETCH64, XENIAL64, BELANOS64
38 # the distro subvol name, we can add as many of these as we want:
39 # VOL_STABLE, VOL_STABLE_BOOTSTRAP, VOL_STRETCH, VOL_XENIAL, VOL_BELANOS
40 # and the class which defines the apt sources files we want,
41 # STABLE_FREE, STABLE_NONFREE, TESTING_FREE, TESTING_NONFREE,
42 # XENIAL_FREE (no XENIAL_NONFREE setup yet), BELANOS, STABLE_LINODE.
43 # This is a little redundant in some cases, but it keeps things
47 # Other notable classes:
49 # REPARTITION: we try to reuse partitions/filesystems to install a new
50 # os into a multi-os system, if we see some basic hueristics, like the
51 # right amount of them. This overrides that.
53 # PARTITION_PROMPT: If we don't see partitions to reuuse, prompt
54 # to make sure we really want to repartition and use a completely
55 # fresh install. I use this in case our repartition check has
56 # a bug in it, or I accidentally set REPARTITION.
58 # ROTATIONAL: in a system with ssd and hdd, install to the hdd
59 # instead of the default ssd.
61 # RAID0: Use raid 0 even if there are >= 4 disks with boot partititions.
64 if [[ -e /a
/bin
/fai
/fai-wrapper
]]; then
65 source /a
/bin
/distro-functions
/src
/identify-distros
66 if isdebian-stable
; then
71 # use a list of classes for our demo machine
74 #echo "PARTITION_PROMPT"
79 if [[ -e /a
/bin
/fai
/fai-wrapper
]] && isdebian-stable
; then
84 echo "STABLE STABLE_LINODE" ;;
87 if grep ^
52:54:00: /sys
/class
/net
/eth
0/address
&>/dev
/null
; then
88 # if our eth0 mac is in the kvm range, we are a vm.