diff options
| author | Craig Jennings <c@cjennings.net> | 2026-01-19 09:46:30 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-01-19 09:46:30 -0600 |
| commit | 3b2bcbbd4a30ec53b44c7dee54a1519bf2d64788 (patch) | |
| tree | 8fbcfea3c14225cec57e0381a03c129a20ed585b /archsetup | |
| parent | d44d8f96aa48c825c70c036d9344ab64b58f86e2 (diff) | |
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)
Diffstat (limited to 'archsetup')
| -rwxr-xr-x | archsetup | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |
