diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2013-06-05 22:22:57 +0200 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2013-06-19 08:01:03 +0200 |
commit | 24cfdfc6a3cc6093980f33f63bc182506234d383 (patch) | |
tree | 4fe54ced3e34e79563274e4b8882868d5f873a4b | |
parent | a486a29f80ebecf65535ab3ee2e67246347d0124 (diff) | |
download | vyos-live-build-24cfdfc6a3cc6093980f33f63bc182506234d383.tar.gz vyos-live-build-24cfdfc6a3cc6093980f33f63bc182506234d383.zip |
Adding hook to remove ssl-cert-snakeoil by default.
-rwxr-xr-x | functions/defaults.sh | 1 | ||||
-rwxr-xr-x | share/hooks/0195-remove-ssl-cert-snakeoil.chroot | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/functions/defaults.sh b/functions/defaults.sh index d2b71058b..3f8825202 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -507,6 +507,7 @@ Set_defaults () remove-openssh-server-host-keys \ remove-python-py \ remove-temporary-files \ + remove-ssl-cert-snakeoil \ remove-udev-persistent-cd-rules \ remove-udev-persistent-net-rules \ remove-systemd-machine-id \ 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 |