Open vSwitch 1.3 and older was creating certificates and private
key in /usr/share/openvswitch/pki. However, since PKI directory
is mutable, then this was considered a bug and PKI directory was
moved to /var directory in Open vSwitch 1.4 Commit
14bd2d51 (debian:
Move PKI directory to FHS-compliant location.)
Note, that Ubuntu 12.04 already was shipping with Open vSwitch 1.4
and should have created (in case of fresh install) or moved (in
case of upgrade from Open vSwitch 1.3) this directory to the right
location.
So I am inclined to remove this code because the only reason for it
to exist would be, if someone would be upgrading from Open vSwitch
1.3 or older version directly to 2.5 without using any intermediary
upgrade releases.
Signed-Off-By: Ansis Atteka <aatteka@nicira.com>
Acked-by: Ben Pfaff <blp@ovn.org>
case "$1" in
configure)
- # Move the pki directory from its previous, non FHS-compliant location,
- # to its new location, leaving behind a symlink for compatibility.
- if test -d /usr/share/openvswitch/pki && \
- test ! -e /var/lib/openvswitch/pki; then
- mv /usr/share/openvswitch/pki /var/lib/openvswitch
- ln -s /var/lib/openvswitch/pki /usr/share/openvswitch/pki
- fi
-
# Create certificate authorities.
if test ! -e /var/lib/openvswitch/pki; then
ovs-pki init
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)
case "$1" in
configure)
cd /etc/openvswitch-testcontroller
-
- # If cacert.pem is a symlink to the old location for cacert.pem,
- # remove it so that we can symlink it to the new location.
- if test -h cacert.pem && \
- test X"`readlink cacert.pem`" = X/usr/share/openvswitch/pki/switchca/cacert.pem; then
- rm -f cacert.pem
- fi
-
if ! test -e cacert.pem; then
ln -s /var/lib/openvswitch/pki/switchca/cacert.pem cacert.pem
fi