aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-20 18:34:04 -0600
committerCraig Jennings <c@cjennings.net>2026-01-20 18:34:04 -0600
commitf5f5714ff184e88251072fa93500d1a7e859a4d3 (patch)
tree35d42ed7c8f4ac0d1467e566dfd0547b3a603399 /scripts
parentcda4274e4940fc12afc3e94368aee1f51b2f20c2 (diff)
downloadarchangel-f5f5714ff184e88251072fa93500d1a7e859a4d3.tar.gz
archangel-f5f5714ff184e88251072fa93500d1a7e859a4d3.zip
Fix mDNS, hostname, and build safety
- Add safe_cleanup_work_dir() to prevent /dev corruption on interrupted builds - Fix shadow file: use sed to modify root entry instead of replacing file - Add /etc/hosts and /etc/nsswitch.conf for proper hostname/mDNS resolution - Add inetutils package for hostname command - Add sanity tests for password, avahi, mdns, and hostname
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sanity-test.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/scripts/sanity-test.sh b/scripts/sanity-test.sh
index 0b338a3..eeb4d29 100755
--- a/scripts/sanity-test.sh
+++ b/scripts/sanity-test.sh
@@ -260,12 +260,21 @@ run_sanity_tests() {
# Test 6: SSH is working (implicit - we're connected)
pass "SSH connectivity"
+ # Test 6b: Root password is set (not empty in shadow file)
+ run_test "Root password is set" \
+ "grep '^root:' /etc/shadow | cut -d: -f2 | grep -q '.' && echo 'password set'" \
+ "password set"
+
# Test 7: Network manager available
run_test "NetworkManager available" \
"systemctl is-enabled NetworkManager 2>/dev/null || echo 'available'" \
""
# Test 8: Avahi mDNS for network discovery
+ run_test "Avahi package installed" \
+ "command -v avahi-daemon && echo 'found'" \
+ "found"
+
run_test "Avahi daemon enabled" \
"systemctl is-enabled avahi-daemon" \
"enabled"
@@ -274,7 +283,16 @@ run_sanity_tests() {
"systemctl is-active avahi-daemon" \
"active"
- # Test 9: Kernel version (LTS)
+ run_test "nss-mdns configured" \
+ "grep -q 'mdns' /etc/nsswitch.conf && echo 'configured'" \
+ "configured"
+
+ # Test 9: Hostname set to archzfs
+ run_test "Hostname is archzfs" \
+ "cat /etc/hostname" \
+ "archzfs"
+
+ # Test 10: Kernel version (LTS)
run_test "Running LTS kernel" \
"uname -r" \
"lts"