Package ovn-host: Scripts

Post install

1
2
3
4
5
6
if [ $1 -eq 1 ]; then
    # move log from openvswitch to ovn dir
    [ ! -f /var/log/openvswitch/ovn-controller.log ] || mv -f /var/log/openvswitch/ovn-controller.log* /var/log/ovn/
    chown -R openvswitch:openvswitch /var/log/ovn
fi
/usr/sbin/post_service ovn-controller
Pre install

# Save the "enabled" state across the transition of
# ownership of ovn-controller.service from openvswitch-ovn-host to
# ovn-host.
SYSTEMCTL=systemctl
if [ $1 -eq 1 ]; then
    if sd_booted && "$SYSTEMCTL" --quiet is-enabled ovn-controller; then
        touch /run/openvswitch-rpm-state-ovn-controller ||:
    fi
    if sd_booted && [ -f /run/openvswitch/ovn-controller.pid ]; then
        touch /run/openvswitch-rpm-state-ovn-controller-started ||:
        "$SYSTEMCTL" --quiet stop ovn-controller ||:
    fi
fi
Pre uninstall

/usr/sbin/preun_service ovn-controller