summaryrefslogtreecommitdiff
path: root/archsetup
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-19 09:46:30 -0600
committerCraig Jennings <c@cjennings.net>2026-01-19 09:46:30 -0600
commit3b2bcbbd4a30ec53b44c7dee54a1519bf2d64788 (patch)
tree8fbcfea3c14225cec57e0381a03c129a20ed585b /archsetup
parentd44d8f96aa48c825c70c036d9344ab64b58f86e2 (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-xarchsetup11
1 files changed, 9 insertions, 2 deletions
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