fixes mostly for stable
[automated-distro-installer] / fai / config / scripts / GRUB_PC / 11-ian
index 6823a0bcec29748ffab1986226ee0e901f2803a8..7cc2341da53ff0234605ab6c460318458a369c88 100755 (executable)
@@ -10,20 +10,29 @@ if ifclass STABLE; then
     fcopy -M /etc/apt/preferences
 fi
 
+if ifclass DEBIAN; then
+    fcopy -M /etc/apt/preferences.d/unstable
+    fcopy -riM /etc/apt/sources.list.d
+fi
+
 
 # -i, ignore nonmatching class error, always return 0.
 fcopy -r -M -i /home/ian/.ssh
 /var/lib/fai/config/distro-install-common/end
 
+rm -f /target/etc/apt/sources.list
 
-# could also use: chroot /target script-file
-$ROOTCMD chown -R 1000:1000 /home/ian/.ssh
-$ROOTCMD chmod -R u=Xrw,og= /home/ian/.ssh
-$ROOTCMD cp -ar /home/ian/.ssh /root
-$ROOTCMD chown -R root:root /root/.ssh
+chroot /target bash <<'EOF'
+chown -R 1000:1000 /home/ian/.ssh
+chmod -R u=Xrw,og= /home/ian/.ssh
+cp -ar /home/ian/.ssh /root
+chown -R root:root /root/.ssh
 
 # default jessie groups + kvm & systemd-journal
-$ROOTCMD usermod -aG cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,kvm,systemd-journal ian
-
+usermod -aG cdrom,floppy,sudo,audio,dip,video,plugdev,netdev,kvm,systemd-journal ian
+EOF
 
-$ROOTCMD apt-get -y install unison/testing
+if ifclass STABLE; then
+    apt-get -y install unison-gtk
+    apt-get -y install unison-gtk/testing
+fi