Boot fixes, scratch windows

This commit is contained in:
Ian Keane 2026-08-09 14:31:49 -04:00
parent 8aa1f8a8a6
commit d3de780583
9 changed files with 740 additions and 0 deletions

View file

@ -39,6 +39,22 @@ backup_and_link "$DOTFILES/config/xorg.conf.d/70-touchpad.conf" "/etc/X11/xorg.c
backup_and_link "$DOTFILES/config/kanata/rc.kanata" "/etc/rc.d/rc.kanata"
chmod +x /etc/rc.d/rc.kanata
# Tailscale daemon
backup_and_link "$DOTFILES/config/tailscale/rc.tailscale" "/etc/rc.d/rc.tailscale"
chmod +x /etc/rc.d/rc.tailscale
mkdir -p /var/lib/tailscale
mkdir -p /var/run/tailscale
# autofs config
backup_and_link "$DOTFILES/config/autofs/auto.master" "/etc/auto.master"
backup_and_link "$DOTFILES/config/autofs/auto.mnt" "/etc/auto.mnt"
# MPD rc script
chmod +x /etc/rc.d/rc.autofs
backup_and_link "$DOTFILES/config/mpd/rc.mpd" "/etc/rc.d/rc.mpd"
chmod +x /etc/rc.d/rc.mpd
mkdir -p /mnt
# NetworkManager wifi power saving fix
backup_and_link "$DOTFILES/config/NetworkManager/wifi-powersave-off.conf" "/etc/NetworkManager/conf.d/wifi-powersave-off.conf"
@ -53,5 +69,38 @@ else
echo "rc.local already has kanata entry, skipping"
fi
# Add boot output logging if not present
if ! grep -q "tee /var/log/rc.local.log" /etc/rc.d/rc.local; then
# Insert logging line after the shebang/header
sed -i '/^#.*Local system/a\\n# Log all boot output to file while still showing on console\nexec > >(tee /var/log/rc.local.log) 2>&1' /etc/rc.d/rc.local
echo "added boot logging to rc.local"
else
echo "rc.local already has boot logging, skipping"
fi
# Add tailscale, autofs, mpd to rc.local if not present
if ! grep -q "rc.tailscale" /etc/rc.d/rc.local; then
cat >> /etc/rc.d/rc.local << 'RCEOF'
# Start tailscale daemon
if [ -x /etc/rc.d/rc.tailscale ]; then
/etc/rc.d/rc.tailscale start
fi
# Start autofs (handles NFS mounts on demand)
if [ -x /etc/rc.d/rc.autofs ]; then
/etc/rc.d/rc.autofs start
fi
# Start MPD (autofs will mount /mnt/media on first access)
if [ -x /etc/rc.d/rc.mpd ]; then
/etc/rc.d/rc.mpd start
fi
RCEOF
echo "added tailscale/autofs/mpd to rc.local"
else
echo "rc.local already has tailscale entry, skipping"
fi
echo ""
echo "done. reboot or restart X for xorg changes to take effect."