[ovs-dev] Bug#661090: [PATCH] debian: Move PKI directory to FHS-compliant location.
Ben Pfaff
blp at nicira.com
Thu Mar 1 23:57:18 UTC 2012
On Fri, Mar 02, 2012 at 12:35:09AM +0100, Andreas Beckmann wrote:
> On 2012-03-02 00:11, Ben Pfaff wrote:
> > + mv /usr/share/openvswitch/pki /var/lib/openvswitch
> > + ln -s /usr/share/openvswitch/pki /var/lib/openvswitch
>
> That link goes in the wrong direction ...
I get that wrong on the first try about half the time. Thanks.
(Obviously I haven't tested this yet.)
> Should the compat symlink be removed during purge?
Sounds like a good idea, thanks, I made that change. Incremental
patch follows:
diff --git a/debian/openvswitch-pki.postinst b/debian/openvswitch-pki.postinst
index 40fff04..7cd6bbb 100755
--- a/debian/openvswitch-pki.postinst
+++ b/debian/openvswitch-pki.postinst
@@ -24,7 +24,7 @@ case "$1" in
if test -d /usr/share/openvswitch/pki && \
test ! -e /var/lib/openvswitch/pki; then
mv /usr/share/openvswitch/pki /var/lib/openvswitch
- ln -s /usr/share/openvswitch/pki /var/lib/openvswitch
+ ln -s /var/lib/openvswitch /usr/share/openvswitch/pki
fi
# Create certificate authorities.
diff --git a/debian/openvswitch-pki.postrm b/debian/openvswitch-pki.postrm
index 5db4d6b..bc91e13 100755
--- a/debian/openvswitch-pki.postrm
+++ b/debian/openvswitch-pki.postrm
@@ -22,6 +22,11 @@ set -e
case "$1" in
purge)
rm -f /var/log/openvswitch/ovs-pki.log* || true
+
+ # Remove backward compatibility symlink, if present.
+ if test -h /usr/share/openvswitch/pki; then
+ rm -f /usr/share/openvswitch/pki
+ fi
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
More information about the dev
mailing list