X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=debian%2Fopenvswitch-controller.postinst;h=3073dc0427e8457e3e8e55cbc904a7cecde478c0;hb=1a15f1d18f4173c9d2a9ad07fe4a7fdb3cc99681;hp=51acfb1ab3b3c16d4a4c49fefceab8d2a6041021;hpb=fceb8605af46fd8434ef021c1b20584af1ac99c3;p=sliver-openvswitch.git diff --git a/debian/openvswitch-controller.postinst b/debian/openvswitch-controller.postinst index 51acfb1ab..3073dc042 100755 --- a/debian/openvswitch-controller.postinst +++ b/debian/openvswitch-controller.postinst @@ -21,8 +21,16 @@ set -e case "$1" in configure) cd /etc/openvswitch-controller + + # 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 /usr/share/openvswitch/pki/switchca/cacert.pem cacert.pem + ln -s /var/lib/openvswitch/pki/switchca/cacert.pem cacert.pem fi if ! test -e privkey.pem || ! test -e cert.pem; then oldumask=$(umask)