small fixes and config changes
[automated-distro-installer] / fai / config / scripts / GRUB_PC / 11-ian
index 9764d8e5f10f5864f4eee7f67a1c3ce3cfce7e8f..221b6d4da9277a9eb8a70dbef7df53052cc7570b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash -x
 
 set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?"' ERR
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
 
 $ROOTCMD adduser --disabled-password --gecos ian ian
 
@@ -37,7 +37,8 @@ chroot /target bash <<'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
@@ -66,3 +67,8 @@ done
 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