Skip to contentSkip to conversation

openvswitch: Ensure pki directory creation

PATCH In review Mihai Prica 2 participants 2 messages Jul 26, 2013 – Jul 31, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 openvswitch: Ensure pki directory creation

RPM doesn't guarantee the order in which postinstalls are ran. Added code to ensure the pki directory is initialized.

---
 .../openvswitch/openvswitch_1.10.0.bb              |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
recipes-networking/openvswitch/openvswitch_1.10.0.bb +5 -1
index fff597c..3703c1b 100644
@@ -14,7 +14,7 @@ RDEPENDS_${PN}-pki = "${PN}"
 RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch"
 RRECOMMENDS_${PN} += "kernel-module-openvswitch"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
 	file://openvswitch-switch \
@@ -91,6 +91,10 @@ pkg_postinst_${PN}-controller () {
                 exit 1
         fi
 
+    if test ! -d $D/${datadir}/${PN}/pki; then
+        ovs-pki init --dir=$D/${datadir}/${PN}/pki
+    fi
+
 	cd $D/${sysconfdir}/openvswitch-controller
         if ! test -e cacert.pem; then
             ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 2 lines · Mihai Prica

RPM doesn't guarantee the order in which postinstalls are ran. Added code to ensure the pki directory is initialized.

Looks good, and tested fine here. Again, sorry for the delay, this is now merged.

Bruce

Quoted 37 lines
---
 .../openvswitch/openvswitch_1.10.0.bb              |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
recipes-networking/openvswitch/openvswitch_1.10.0.bb +5 -2
index fff597c..3703c1b 100644
@@ -14,7 +14,7 @@ RDEPENDS_${PN}-pki = "${PN}"
 RDEPENDS_${PN}-brcompat = "${PN} ${PN}-switch"
 RRECOMMENDS_${PN} += "kernel-module-openvswitch"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://openvswitch.org/releases/openvswitch-${PV}.tar.gz \
        file://openvswitch-switch \
@@ -91,6 +91,10 @@ pkg_postinst_${PN}-controller () {
                 exit 1
         fi
 
+    if test ! -d $D/${datadir}/${PN}/pki; then
+        ovs-pki init --dir=$D/${datadir}/${PN}/pki
+    fi
+
        cd $D/${sysconfdir}/openvswitch-controller
         if ! test -e cacert.pem; then
             ln -s $D/${datadir}/${PN}/pki/switchca/cacert.pem cacert.pem
--

1.7.9.5

_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"