X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FGRUB_PC%2F11-iank;h=deab6797c5e5ca4c225d35f2438a426dc01083d8;hb=4d23584c79e6c519f24042b11bc2cb5cd04ea284;hp=e27260e76065f0c77c02b71a8e8a8647bde33686;hpb=b5aa031e877e295b016d26b01803a719feb7e051;p=automated-distro-installer diff --git a/fai/config/scripts/GRUB_PC/11-iank b/fai/config/scripts/GRUB_PC/11-iank index e27260e..deab679 100755 --- a/fai/config/scripts/GRUB_PC/11-iank +++ b/fai/config/scripts/GRUB_PC/11-iank @@ -24,10 +24,10 @@ fi # -r = recursive # -i = ignore non-matching class warnings, always exit 0 # -B = no backup files -fcopy -riB /boot +fcopy -riBM /boot # this is also done by FABASE/10-misc by default (without B) -fcopy -riB /root -fcopy -riB /usr/local/bin +fcopy -riBM /root +fcopy -riBM /usr/local/bin src=$FAI/distro-install-common/shadow @@ -49,6 +49,14 @@ tmpfile1=$(mktemp) # this can fail if we need an apt update chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile1 ||: fcopy -riBM /etc/apt + +# vps that didnt start with fai need the key +case $HOSTNAME in + je|bk|li) + apt-key add /a/bin/fai/fai/config/package_config/UBUNTU.asc + ;; +esac + tmpfile2=$(mktemp) chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile2 if ! diff -q $tmpfile1 $tmpfile2; then @@ -215,7 +223,7 @@ EOF fi # use networkmanager if this host has wireless. -if type -p iw &>/dev/null && [[ $(iw dev) ]]; then +if [[ $HOSTNAME == bo ]] || type -p iw &>/dev/null && [[ $(iw dev) ]]; then chroot $FAI_ROOT bash </home/iank/.local/share/systemd/user/sshaiank.service <<'EOF' -[Unit] -Description=OpenSSH User Agent -Documentation=man:ssh-agent(1) -[Service] -ExecStart=/usr/lib/openssh/agent-launch start -ExecStopPost=/usr/lib/openssh/agent-launch stop -[Install] -WantedBy=default.target -EOF -# enable it -# systemctl --user is not available at fai time, so create the link ourselves -dir=/home/iank/.config/systemd/user/default.target.wants -mkdir -p $dir -ln -sf /home/iank/.local/share/systemd/user/sshaiank.service $dir +rm -f /home/iank/.local/share/systemd/user/sshaiank.service \ + /home/iank/.config/systemd/user/default.target.wants/sshaiank.service #### end .ssh setup ### @@ -379,7 +373,7 @@ f=/etc/ssh/sshd_config grep -xFq "$line" $f || tee -a $f <<<"$line" -# default debian groups (jessie through buster) + adm, sudo, root, admin +# default debian groups (jessie through buster) + adm, root, admin for g in cdrom floppy audio dip video plugdev netdev adm sudo admin; do if getent group $g >/dev/null; then usermod -aG $g iank