]> git.proxmox.com Git - ovs.git/commitdiff
* Reworked .service files to make them look like in Ubuntu (as I still want
authorThomas Goirand <zigo@debian.org>
Mon, 11 Jan 2021 20:09:32 +0000 (21:09 +0100)
committerThomas Goirand <zigo@debian.org>
Mon, 11 Jan 2021 20:09:32 +0000 (21:09 +0100)
    our packages converge).

debian/changelog
debian/openvswitch-switch.openvswitch-nonetwork.service [deleted file]
debian/openvswitch-switch.ovs-vswitchd.service [new file with mode: 0644]
debian/openvswitch-switch.ovsdb-server.service [new file with mode: 0644]
debian/openvswitch-switch.service

index 0d099d82b814a462c8742a95d98b57355769a559..a02a3bbe3f52d6720ef388c3001794bcff9a1c18 100644 (file)
@@ -1,3 +1,10 @@
+openvswitch (2.15.0~git20210104.def6eb1ea+dfsg1-3) unstable; urgency=medium
+
+  * Reworked .service files to make them look like in Ubuntu (as I still want
+    our packages converge).
+
+ -- Thomas Goirand <zigo@debian.org>  Mon, 11 Jan 2021 21:08:37 +0100
+
 openvswitch (2.15.0~git20210104.def6eb1ea+dfsg1-2) unstable; urgency=medium
 
   * Blacklist more tests for mipsel and mipsel64.
diff --git a/debian/openvswitch-switch.openvswitch-nonetwork.service b/debian/openvswitch-switch.openvswitch-nonetwork.service
deleted file mode 100644 (file)
index ba09af3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=Open vSwitch Internal Unit
-PartOf=openvswitch-switch.service
-DefaultDependencies=no
-After=apparmor.service local-fs.target systemd-tmpfiles-setup.service dpdk.service
-Wants=network-pre.target openvswitch-switch.service
-Before=network-pre.target openvswitch-switch.service
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-EnvironmentFile=-/etc/default/openvswitch-switch
-ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start \
-          --system-id=random $OVS_CTL_OPTS
-ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop
diff --git a/debian/openvswitch-switch.ovs-vswitchd.service b/debian/openvswitch-switch.ovs-vswitchd.service
new file mode 100644 (file)
index 0000000..f2c080e
--- /dev/null
@@ -0,0 +1,24 @@
+[Unit]
+Description=Open vSwitch Forwarding Unit
+After=ovsdb-server.service network-pre.target systemd-udev-settle.service
+Before=network.target networking.service
+Requires=ovsdb-server.service
+ReloadPropagatedFrom=ovsdb-server.service
+AssertPathIsReadWrite=/var/run/openvswitch/db.sock
+PartOf=openvswitch-switch.service
+DefaultDependencies=no
+
+[Service]
+LimitNOFILE=1048576
+Type=forking
+Restart=on-failure
+Environment=HOME=/var/run/openvswitch
+EnvironmentFile=-/etc/default/openvswitch-switch
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+          --no-ovsdb-server --no-monitor --system-id=random \
+          start $OVS_CTL_OPTS
+ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server stop
+ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovsdb-server \
+          --no-monitor --system-id=random \
+          restart $OVS_CTL_OPTS
+TimeoutSec=300
diff --git a/debian/openvswitch-switch.ovsdb-server.service b/debian/openvswitch-switch.ovsdb-server.service
new file mode 100644 (file)
index 0000000..2b37229
--- /dev/null
@@ -0,0 +1,21 @@
+[Unit]
+Description=Open vSwitch Database Unit
+After=syslog.target network-pre.target dpdk.service local-fs.target
+Before=network.target networking.service
+PartOf=openvswitch-switch.service
+DefaultDependencies=no
+
+[Service]
+LimitNOFILE=1048576
+Type=forking
+Restart=on-failure
+EnvironmentFile=-/etc/default/openvswitch-switch
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+          --no-ovs-vswitchd --no-monitor --system-id=random \
+          start $OVS_CTL_OPTS
+ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
+ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
+           --no-monitor restart $OVS_CTL_OPTS
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
+RuntimeDirectoryPreserve=yes
index bcfdbe05efa3862bfeecaab20be137e71b2d65c4..f03f8b3d29cc71a810234c32ca3d8dad9c0b518f 100644 (file)
@@ -1,13 +1,16 @@
 [Unit]
 Description=Open vSwitch
-After=openvswitch-nonetwork.service
-Requires=openvswitch-nonetwork.service
-Before=networking.service
+Before=network.target
+After=network-pre.target ovsdb-server.service ovs-vswitchd.service
+PartOf=network.target
+Requires=ovsdb-server.service
+Requires=ovs-vswitchd.service
 
 [Service]
 Type=oneshot
-ExecStart=/etc/init.d/openvswitch-switch systemd-start
-ExecStop=/etc/init.d/openvswitch-switch systemd-stop
+ExecStart=/bin/true
+ExecReload=/usr/share/openvswitch/scripts/ovs-systemd-reload
+ExecStop=/bin/true
 RemainAfterExit=yes
 
 [Install]