summaryrefslogtreecommitdiff
path: root/net-misc/openvswitch/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/openvswitch/files')
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd-r2.service (renamed from net-misc/openvswitch/files/ovs-vswitchd2.service)0
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd-r3.service26
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd.confd-r27
-rw-r--r--net-misc/openvswitch/files/ovsdb-server-r2.service (renamed from net-misc/openvswitch/files/ovsdb-server2.service)0
-rw-r--r--net-misc/openvswitch/files/ovsdb-server-r3.service22
5 files changed, 55 insertions, 0 deletions
diff --git a/net-misc/openvswitch/files/ovs-vswitchd2.service b/net-misc/openvswitch/files/ovs-vswitchd-r2.service
index 3092fdaaa669..3092fdaaa669 100644
--- a/net-misc/openvswitch/files/ovs-vswitchd2.service
+++ b/net-misc/openvswitch/files/ovs-vswitchd-r2.service
diff --git a/net-misc/openvswitch/files/ovs-vswitchd-r3.service b/net-misc/openvswitch/files/ovs-vswitchd-r3.service
new file mode 100644
index 000000000000..165ea3bfbf81
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd-r3.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=Open vSwitch Daemon
+Documentation=man:ovs-vswitchd
+Wants=network.target
+Before=network.target network.service
+Requires=ovsdb-server.service
+After=ovsdb-server.service network-pre.target systemd-udev-settle.service
+ReloadPropagatedFrom=ovsdb-server.service
+AssertPathIsReadWrite=/var/run/openvswitch/db.sock
+
+[Service]
+Type=forking
+Restart=on-failure
+Environment=HOME=/var/run/openvswitch
+EnvironmentFile=-/etc/conf.d/ovs-vswitchd
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovsdb-server --no-monitor --system-id=random \
+ --ovs-user=${OVS_USER_ID} start $OPTIONS
+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 --ovs-user=${OVS_USER_ID} \
+ restart $OPTIONS
+TimeoutSec=300
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openvswitch/files/ovs-vswitchd.confd-r2 b/net-misc/openvswitch/files/ovs-vswitchd.confd-r2
new file mode 100644
index 000000000000..eb4b6c2f2831
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd.confd-r2
@@ -0,0 +1,7 @@
+# Connection string for the configuration database (usually a unix socket)
+DATABASE="unix:/var/run/openvswitch/db.sock"
+
+# Additional options
+OPTIONS="--mlockall"
+
+OVS_USER_ID="root:root"
diff --git a/net-misc/openvswitch/files/ovsdb-server2.service b/net-misc/openvswitch/files/ovsdb-server-r2.service
index 5ff6f9044660..5ff6f9044660 100644
--- a/net-misc/openvswitch/files/ovsdb-server2.service
+++ b/net-misc/openvswitch/files/ovsdb-server-r2.service
diff --git a/net-misc/openvswitch/files/ovsdb-server-r3.service b/net-misc/openvswitch/files/ovsdb-server-r3.service
new file mode 100644
index 000000000000..a1d308478daa
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server-r3.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Open vSwitch Database Unit
+Documentation=man:ovsdb-server
+After=syslog.target network-pre.target
+Before=network.target network.service
+Wants=ovs-delete-transient-ports.service
+
+[Service]
+Type=forking
+Restart=on-failure
+EnvironmentFile=-/etc/conf.d/ovsdb-server
+ExecStartPre=/bin/chown ${OVS_USER_ID} /var/run/openvswitch /var/log/openvswitch
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovs-vswitchd --no-monitor --system-id=random \
+ --ovs-user=${OVS_USER_ID} \
+ start $OPTIONS
+ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
+ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
+ --ovs-user=${OVS_USER_ID} \
+ --no-monitor restart $OPTIONS
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755