trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
cd /a/opt
-#iso="archlinux-2015.11.01-dual"
-iso="archlinux-2016.01.01-dual"
+iso="archlinux-2016.05.01-dual"
sfs=$iso/arch/x86_64/airootfs.sfs
rm -rf $iso
ex $iso.iso
# use a list of classes for our demo machine
case $HOSTNAME in
demohost)
- echo "FAIBASE DEBIAN DESKTOP STABLE" ;;
+ echo "FAIBASE DEBIAN DESKTOP" ;;
x2)
echo "FAIBASE DEBIAN DESKTOP PARTITION_PROMPT" ;;
tp)
echo "FAIBASE DEBIAN DESKTOP PARTITION_PROMPT" ;;
frodo)
echo "FAIBASE DEBIAN DESKTOP STABLE PARTITION_PROMPT" ;;
+ treetowl)
+ echo "FAIBASE DEBIAN DESKTOP STABLE REPARTITION" ;;
# faiserver)
# echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
# xfcehost)
[[ $dir != /q ]] || break
done
-# kvm is normally created by some package,
-# but unison doesn't like unknown groups, so make it now so initial sync works.
-$ROOTCMD groupadd -r kvm || [[ $? == 9 ]]
# keyfiles generated like:
# head -c 2048 /dev/urandom | od | s dd of=/q/root/luks/host-demohost
luks_dir=${LUKS_DIR:-/var/lib/fai/config/distro-install-common/luks}
+
+if [[ ! -e $luks_dir/host-$HOSTNAME ]]; then
+ echo "$0: error: no key for hostname at $luks_dir/host-$HOSTNAME" >&2
+ exit 1
+fi
+
if ifclass tp; then
lukspw=$(cat $luks_dir/traci)
else
$first_boot_dev /boot btrfs noatime,subvol=boot_$DISTRO 0 0
EOF
+
+if ifclass treetowl; then
+ cat >> /tmp/fai/fstab <<'EOF'
+UUID=3f7b31cd-f299-40b4-a86b-7604282e2715 /i btrfs noatime 0 2
+EOF
+fi
+
swaps=()
for dev in ${devs[@]}; do
swaps+=(`swap-cryptname`)
# you add some delay.
# http://wiki.libvirt.org/page/PXE_boot_%28or_dhcp%29_on_guest_failed
iface br0 inet dhcp
- bridge_ports eth0
+ bridge_ports $NIC1
bridge_stp off
bridge_maxwait 0
EOF
set -eE -o pipefail
chown -R 1000:1000 /home/ian/.ssh
chmod -R u=Xrw,og= /home/ian/.ssh
-cp -ar /home/ian/.ssh /root
+rm -rf /root/.ssh
+cp -rL /home/ian/.ssh /root
chown -R root:root /root/.ssh
# default jessie groups + kvm & systemd-journal
if ifclass frodo; then
$ROOTCMD usermod -p "$(cat /var/lib/fai/config/distro-install-common/shadow/traci-simple)" traci
fi
+
+
+# makes the journal be saved to disk.
+$ROOTCMD mkdir -p /target/var/log/journal
+$ROOTCMD chmod 755 /target/var/log/journal
action=$1
arch() {
- default
+ plain-tftp
cat <<'EOF'
dhcp-option-force=209,boot/syslinux/archiso.cfg
dhcp-option-force=210,/arch/
# sudo dhclient -r; sudo dhclient <interface-name>
# default dhcp range is 100-150
-dhcp-host=f4:6d:04:02:ee:eb,192.168.1.2,treetowl
+dhcp-host=00:15:17:d2:1a:1c,192.168.1.2,treetowl
dhcp-host=00:26:18:97:bb:16,192.168.1.3,frodo
dhcp-host=10:78:d2:da:29:22,192.168.1.4,htpc
dhcp-host=00:1f:16:16:39:24,192.168.1.5,x2