X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=distro-begin;h=eb51dcbe33fb67d0008357e8bddc203ad6f125f3;hb=a1ebefe19ab910d20fad0c2fd88637fee23dee7c;hp=22fff60409d135d21ae76167ae28e2de5a9df3b5;hpb=929bcfbc41e050d69b48405ac8bb6d03af930d95;p=distro-setup diff --git a/distro-begin b/distro-begin index 22fff60..eb51dcb 100755 --- a/distro-begin +++ b/distro-begin @@ -55,14 +55,13 @@ if ! $interactive; then fi source /a/bin/errhandle/err -errcatch-cleanup() { +err-cleanup() { echo 1 >~/.local/distro-begin } source /a/bin/distro-functions/src/package-manager-abstractions ### setup logging -exec &> >(sudo tee -a /var/log/distro-begin) echo "$0: $(date): starting now)" @@ -128,7 +127,7 @@ if encrypted; then # but it happened too late in the shutdown process. sudo dd of=/etc/systemd/system/keyscripton.service <<'EOF' [Unit] -Description=Turn on automatic decryption of drives on boot +Description=keyscripton # This is triggered by reboot and when keyscriptoff stops. # tried using graphical.target, but it made my display manager restart before rebooting. @@ -154,7 +153,7 @@ EOF sudo dd of=/etc/systemd/system/keyscriptoff.service <<'EOF' [Unit] -Description=Turn off automatic decryption of drives on boot +Description=keyscriptoff [Service] Type=oneshot @@ -213,8 +212,13 @@ if [[ $HOSTNAME != $(cat /etc/hostname) ]]; then echo $HOSTNAME > /etc/hostname hostname -F /etc/hostname fi +# office vpn dhcp adds to /etc/resolv.conf search office.fsf.org which +# makes that be #1 priority, which makes dnsmasq resolve that for +# unqualified hosts first, which means we skip the hosts file. Ya, its +# kinda dumb, but it is what it is. There is a dnsmasq config option to +# override it too, but this seems simpler. sudo sed -i --follow-symlinks -f - /etc/hosts <~/.local/distro-begin echo "$0: $(date): ending now" +echo "exiting with status 0" exit 0