disk detection, fixes for deb stable
[automated-distro-installer] / fai / config / scripts / GRUB_PC / 11-ian
1 #!/bin/bash -x
2
3 set -eE -o pipefail
4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
5
6 $ROOTCMD adduser --disabled-password --gecos ian ian
7 $ROOTCMD usermod -p "$ROOTPW" ian
8
9 if ifclass STABLE; then
10 fcopy -M /etc/apt/preferences
11 fi
12
13
14 # -i, ignore nonmatching class error, always return 0.
15 fcopy -r -M -i /home/ian/.ssh
16 /var/lib/fai/config/distro-install-common/end
17
18
19 # could also use: chroot /target script-file
20 $ROOTCMD chown -R 1000:1000 /home/ian/.ssh
21 $ROOTCMD chmod -R u=Xrw,og= /home/ian/.ssh
22 $ROOTCMD cp -ar /home/ian/.ssh /root
23 $ROOTCMD chown -R root:root /root/.ssh
24
25 # default jessie groups + kvm & systemd-journal
26 $ROOTCMD usermod -aG cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,kvm,systemd-journal ian
27
28
29 $ROOTCMD apt-get -y install unison/testing