Skip to content

Commit

Permalink
debian: Remove old PKI directory migration code
Browse files Browse the repository at this point in the history
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 14bd2d5 (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>
  • Loading branch information
Ansis Atteka committed Dec 23, 2015
1 parent 52d6875 commit 0e39b0a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions debian/openvswitch-pki.postinst
Expand Up @@ -19,14 +19,6 @@ set -e

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
Expand Down
5 changes: 0 additions & 5 deletions debian/openvswitch-pki.postrm
Expand Up @@ -22,11 +22,6 @@ 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)
Expand Down
8 changes: 0 additions & 8 deletions debian/openvswitch-testcontroller.postinst
Expand Up @@ -21,14 +21,6 @@ set -e
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
Expand Down

0 comments on commit 0e39b0a

Please sign in to comment.