add arch support, fixup various things
[automated-distro-installer] / fai / config / distro-install-common / end
1 #!/bin/bash -x
2
3 set -eE -o pipefail
4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
5
6
7
8
9 # based on unison error, with 8192 from
10 # sysctl -a | grep fs.inotify.max_user_watches
11 #http://stackoverflow.com/questions/535768/what-is-a-reasonable-amount-of-inotify-watches-with-linux
12 echo "fs.inotify.max_user_watches = 1000000" >> $target/etc/sysctl.d/99-sysctl.conf
13 # if we weren't rebooting, you could apply it now with:
14 # sysctl --system
15
16 echo 'ian ALL=(ALL) NOPASSWD: ALL' >> $target/etc/sudoers
17
18
19 dir=/q/p/c/machine_specific/$HOSTNAME/.unison
20 $ROOTCMD mkdir -p $dir
21 $ROOTCMD rm -rf /root/.unison
22 $ROOTCMD ln -s $dir /root
23 $ROOTCMD ln -s /q/p /
24 $ROOTCMD ln -s /q/a /
25
26 # kvm is normally created by some package,
27 # but unison doesn't like unknown groups, so make it now so initial sync works.
28 $ROOTCMD groupadd kvm