]> git.proxmox.com Git - pve-manager.git/blob - services/pvenetcommit
d/postinst: use reload-or-restart instead of try-reload-or-try-restart
[pve-manager.git] / services / pvenetcommit
1 #!/bin/sh
2
3 ### BEGIN INIT INFO
4 # Provides: pvenetcommit
5 # Required-Start: checkroot
6 # Required-Stop:
7 # Default-Start: S
8 # Default-Stop:
9 # Short-Description: commits network changes
10 ### END INIT INFO
11
12 set -e
13
14 . /lib/lsb/init-functions
15
16 PATH=/sbin:/bin
17
18 IFFN=/etc/network/interfaces
19
20 # we cant use perl here, because this skript runs before
21 # we have /usr mounted
22
23 case "$1" in
24 start)
25 # remove OVS config
26 rm -f /etc/openvswitch/conf.db
27
28 if test -f "${IFFN}.new"; then
29 echo "committing new network configuration";
30 if ! mv "${IFFN}.new" $IFFN; then
31 echo "unable to commit changes to '${IFFN}' - $!\n";
32 fi
33 fi
34 ;;
35 stop|restart|force-reload)
36 exit 0
37 ;;
38 *)
39 echo "Usage: /etc/init.d/pvenetcommit {start}"
40 exit 0
41 ;;
42 esac
43
44 exit 0