summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2013-06-05 22:22:57 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2013-06-19 08:01:03 +0200
commit24cfdfc6a3cc6093980f33f63bc182506234d383 (patch)
tree4fe54ced3e34e79563274e4b8882868d5f873a4b /share
parenta486a29f80ebecf65535ab3ee2e67246347d0124 (diff)
downloadvyos-live-build-24cfdfc6a3cc6093980f33f63bc182506234d383.tar.gz
vyos-live-build-24cfdfc6a3cc6093980f33f63bc182506234d383.zip
Adding hook to remove ssl-cert-snakeoil by default.
Diffstat (limited to 'share')
-rwxr-xr-xshare/hooks/0195-remove-ssl-cert-snakeoil.chroot13
1 files changed, 13 insertions, 0 deletions
diff --git a/share/hooks/0195-remove-ssl-cert-snakeoil.chroot b/share/hooks/0195-remove-ssl-cert-snakeoil.chroot
new file mode 100755
index 000000000..cdfe39d24
--- /dev/null
+++ b/share/hooks/0195-remove-ssl-cert-snakeoil.chroot
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+# Remove ssl-cert snakeoil
+
+if [ -e /etc/ssl/certs/ssl-cert-snakeoil.pem ]
+then
+ rm -f /etc/ssl/certs/$(openssl x509 -hash -noout -in /etc/ssl/certs/ssl-cert-snakeoil.pem)
+
+ rm -f /etc/ssl/certs/ssl-cert-snakeoil.pem
+ rm -f /etc/ssl/private/ssl-cert-snakeoil.key
+fi