Install self-signed certificates in /etc/openvswitch using the
ovs-pki utility.

Bug #9063.

Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
 rhel/openvswitch.spec.in |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index 0c2daf3..fb95e50 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -84,6 +84,13 @@ else
     done
 fi
 
+#Install self-signed certificates.
+OVSPKI="/usr/bin/ovs-pki"
+if [ -x "${OVSPKI}" ]; then
+    (cd /etc/openvswitch && ${OVSPKI} req ovsclient && \
+        ${OVSPKI} self-sign ovsclient) > /dev/null 2>&1
+fi
+
 # Ensure all required services are set to run
 /sbin/chkconfig --add openvswitch
 /sbin/chkconfig openvswitch on
@@ -99,6 +106,9 @@ if [ "$1" = "0" ]; then     # $1 = 0 for uninstall
     rm -f /etc/openvswitch/conf.db
     rm -f /etc/sysconfig/openvswitch
     rm -f /etc/openvswitch/vswitchd.cacert
+    rm -f /etc/openvswitch/ovsclient-privkey.pem
+    rm -f /etc/openvswitch/ovsclient-req.pem
+    rm -f /etc/openvswitch/ovsclient-cert.pem
 fi
 
 exit 0
-- 
1.7.2.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to