summaryrefslogtreecommitdiff
path: root/hooks/build-os-post
diff options
context:
space:
mode:
authorPhilip J Freeman <elektron@halo.nu>2026-04-28 22:53:17 -0700
committerPhilip J Freeman <elektron@halo.nu>2026-04-28 22:53:17 -0700
commit69ab83554efb0aaae69fb469d11a8a8faf4b7c45 (patch)
tree41b02bf25637673695e4b52976c2430e64e67d89 /hooks/build-os-post
parent3f32def2e2a8df3eb0f81597092b375a27765be4 (diff)
To: 72f96fb792b373276aded94500e9bb8bb682f60c94d748477a368e16e31fcc09
Diffstat (limited to 'hooks/build-os-post')
-rwxr-xr-xhooks/build-os-post/70-cleanup-etc18
1 files changed, 18 insertions, 0 deletions
diff --git a/hooks/build-os-post/70-cleanup-etc b/hooks/build-os-post/70-cleanup-etc
new file mode 100755
index 0000000..97e2e8b
--- /dev/null
+++ b/hooks/build-os-post/70-cleanup-etc
@@ -0,0 +1,18 @@
+#!/bin/bash -xe
+set -o pipefail
+
+# remove local self-signed snakeoil certificate
+find "$root"/etc/ssl/certs -maxdepth 1 -lname ssl-cert-snakeoil.pem -delete
+rm -f -- \
+ ssl/private/ssl-cert-snakeoil.key \
+ ssl/certs/ssl-cert-snakeoil.pem
+
+# cleanup some additional things in etc
+pushd "${root:?}"/etc
+rm -f -- \
+ resolv.conf \
+ group- \
+ gshadow- \
+ passwd- \
+ shadow-
+