From 3b2bcbbd4a30ec53b44c7dee54a1519bf2d64788 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 19 Jan 2026 09:46:30 -0600 Subject: fix(archsetup): fix DNS and git safe.directory for curl|bash - Bootstrap DNS symlink in create_user() before AUR/git operations - Add git safe.directory config before git restore (root on user repo) --- archsetup | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'archsetup') diff --git a/archsetup b/archsetup index 197c1a0..c48f5ad 100755 --- a/archsetup +++ b/archsetup @@ -609,6 +609,13 @@ create_user () { (chown -R "$username":wheel "$source_dir" >> "$logfile" 2>&1) || \ error "crash" "changing ownership of $source_dir" "$?" + + # Bootstrap DNS for git clones and AUR installs (full config in essential_services) + if [ ! -L /etc/resolv.conf ] || [ "$(readlink /etc/resolv.conf)" != "/run/systemd/resolve/stub-resolv.conf" ]; then + display "task" "bootstrapping DNS resolution" + ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf >> "$logfile" 2>&1 || \ + error "error" "bootstrapping DNS resolution" "$?" + fi } ### User Customizations @@ -633,8 +640,8 @@ user_customizations() { >> "$logfile" 2>&1 ) || error "error" "$action" "$?" action="restoring dotfile versions" && display "task" "$action" - (cd "$dotfiles_dir" && git restore . \ - >> "$logfile" 2>&1 ) || error "error" "$action" "$?" + (cd "$dotfiles_dir" && git config --global --add safe.directory "$user_archsetup_dir" && \ + git restore . >> "$logfile" 2>&1 ) || error "error" "$action" "$?" action="creating common directories" && display "task" "$action" # Create default directories and grant permissions -- cgit v1.2.3