pve-manager/bin/init.d/pvenetcommit
Dietmar Maurer 1329a45fc7 remove ovs database at boot time
We store our network config in /etc/network/interfaces instead.
2013-12-27 09:42:29 +01:00

45 lines
766 B
Bash

#!/bin/sh
### BEGIN INIT INFO
# Provides: pvenetcommit
# Required-Start: checkroot
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: commits network changes
### END INIT INFO
set -e
. /lib/lsb/init-functions
PATH=/sbin:/bin
IFFN=/etc/network/interfaces
# we cant use perl here, because this skript runs before
# we have /usr mounted
case "$1" in
start)
# remove OVS config
rm -f /etc/openvswitch/conf.db
if test -f "${IFFN}.new"; then
echo "committing new network configuration";
if ! mv "${IFFN}.new" $IFFN; then
echo "unable to commit changes to '${IFFN}' - $!\n";
fi
fi
;;
stop|restart|force-reload)
exit 0
;;
*)
echo "Usage: /etc/init.d/pvenetcommit {start}"
exit 0
;;
esac
exit 0