Skip to content

Commit

Permalink
daemon.start: cleanup /etc/ovn before setting it up
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
(cherry picked from commit 1ff5a9a)
  • Loading branch information
simondeziel authored and tomponline committed Apr 19, 2024
1 parent 4809bdc commit 8da3a45
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,18 @@ sed \
"${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf

# Setup for OVN
echo "==> Cleaning up OVN configuration"
if [ -L /etc/ovn ]; then
echo "=> Removing /etc/ovn symlink"
rm -f /etc/ovn
elif [ -d /etc/ovn ]; then
echo "=> Removing /etc/ovn directory"
rm -rf /etc/ovn
fi

echo "==> Setting up OVN configuration"
if [ "${ovn_builtin:-"false"}" = "true" ]; then
echo "=> Using builtin OVN"
mkdir -p "${SNAP_COMMON}/ovn"
ln -s "${SNAP_COMMON}/ovn" /etc/ovn
elif [ -d "${SNAP_DATA}/microovn/certificates/pki" ]; then
Expand Down

0 comments on commit 8da3a45

Please sign in to comment.