ssh root@faiserver rm -rf /srv/fai/config/\*
scp -r /a/bin/fai/fai/config root@faiserver:/srv/fai
-ssh root@faiserver tee -a /srv/fai/config/class/DESKTOP.var <<EOF
+# fai example pass: fai
+#ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
+
+# generating a hashed password:
+# under debian, you can do
+# echo "yoursecrectpassword" | mkpasswd -m sha-512 -s
+# On arch, best seems to be copy your shadow file to a temp location,
+# then passwd, get out the new pass, then copy the shadow file back.
+ssh root@faiserver tee -a /srv/fai/config/class/DEFAULT.var <<EOF
ROOTPW='$(cat /p/shadow/standard)'
EOF
scp ~/.ssh/id_rsa.pub \
- root@faiserver:/srv/fai/config/files/home/ian/.ssh/authorized_keys/DESKTOP
+ root@faiserver:/srv/fai/config/files/home/ian/.ssh/authorized_keys/GRUB_PC
s scp -r /q/root/luks root@faiserver:/srv/fai/config/distro-install-common
ssh root@faiserver chmod -R a+r /srv/fai/config/distro-install-common
case $HOSTNAME in
faiserver)
echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
- demohost|client*)
- echo "FAIBASE DEBIAN DEMO" ;;
+ demohost)
+ echo "FAIBASE DEBIAN" ;;
xfcehost)
echo "FAIBASE DEBIAN DEMO XORG XFCE LVM";;
gnomehost)
*)
echo "FAIBASE DEBIAN" ;;
esac
+
+if grep ^52:54:00: /sys/class/net/eth0/address &>/dev/null; then
+ # if our eth0 mac is in the kvm range, we are a vm.
+ echo "VM"
+fi
## changed from upstream. found in /usr/share/zoneinfo/, via fai-guide
TIMEZONE=US/Pacific
-# the hash of the root password for the new installed linux system
-# pw is "fai"
-ROOTPW='$1$kBnWcO.E$djxB128U7dMkrltJHPf6d1'
-
# errors in tasks greater than this value will cause the installation to stop
STOP_ON_ERROR=700
--- /dev/null
+#!/bin/bash -x
+
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
+
+
+
+
+# based on unison error, with 8192 from
+# sysctl -a | grep fs.inotify.max_user_watches
+#http://stackoverflow.com/questions/535768/what-is-a-reasonable-amount-of-inotify-watches-with-linux
+echo "fs.inotify.max_user_watches = 1000000" >> $target/etc/sysctl.d/99-sysctl.conf
+# if we weren't rebooting, you could apply it now with:
+# sysctl --system
+
+echo 'ian ALL=(ALL) NOPASSWD: ALL' >> $target/etc/sudoers
+++ /dev/null
-#! /bin/bash
-
-# (c) Thomas Lange, 2001-2013, lange@debian.org
-
-error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
-
-ifclass XORG && {
- fcopy -M /etc/X11/xorg.conf
-}
-
-if ifclass UBUNTU; then
- groups="adm cdrom sudo dip plugdev lpadmin sambashare"
- $ROOTCMD addgroup --system lpadmin || true
- $ROOTCMD addgroup --system sambashare || true
-fi
-
-# add a demo user account
-if ! $ROOTCMD getent passwd demo ; then
- $ROOTCMD adduser --disabled-login --gecos "fai demo user" demo
- $ROOTCMD usermod -p "$ROOTPW" demo
- for g in $groups; do
- $ROOTCMD adduser demo $g
- done
-fi
--- /dev/null
+#!/bin/bash -x
+
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
+
+$ROOTCMD adduser --disabled-password --gecos ian ian
+$ROOTCMD usermod -p "$ROOTPW" ian
+
+/var/lib/fai/config/distro-install-common/end
+
+fcopy -r -m 1000,1000,700 -i /home/ian/.ssh
+
+# the defaults in wheezy
+$ROOTCMD usermod -aG cdrom,floppy,sudo,audio,dip,video,plugdev,netdev ian