summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Thode <prometheanfire@gentoo.org>2018-09-23 15:21:21 -0500
committerMatthew Thode <prometheanfire@gentoo.org>2018-09-23 15:21:37 -0500
commit32da9e276ee7e0af61535e3c9ab605678347ba8e (patch)
tree13a839aa877e0dbadf10f76a99ce51a727e2d5ca /net-misc/openvswitch/files
parentsys-auth/pambase: Commit forgotten patch (diff)
downloadgentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.tar.gz
gentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.tar.bz2
gentoo-32da9e276ee7e0af61535e3c9ab605678347ba8e.zip
net-misc/openvswitch: bumping to 2.10.0-r1 for some systemd changes
Package-Manager: Portage-2.3.49, Repoman-2.3.11 RepoMan-Options: --force
Diffstat (limited to 'net-misc/openvswitch/files')
-rw-r--r--net-misc/openvswitch/files/ovs-delete-transient-ports.service10
-rw-r--r--net-misc/openvswitch/files/ovs-vswitchd2.service26
-rw-r--r--net-misc/openvswitch/files/ovsdb-server2.service24
-rw-r--r--net-misc/openvswitch/files/ovsdb-server_conf23
4 files changed, 63 insertions, 0 deletions
diff --git a/net-misc/openvswitch/files/ovs-delete-transient-ports.service b/net-misc/openvswitch/files/ovs-delete-transient-ports.service
new file mode 100644
index 00000000000..4cd4d7f57f9
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-delete-transient-ports.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Open vSwitch Delete Transient Ports
+After=ovsdb-server.service
+Before=ovs-vswitchd.service
+AssertPathExists=/var/run/openvswitch/db.sock
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl delete-transient-ports
diff --git a/net-misc/openvswitch/files/ovs-vswitchd2.service b/net-misc/openvswitch/files/ovs-vswitchd2.service
new file mode 100644
index 00000000000..3092fdaaa66
--- /dev/null
+++ b/net-misc/openvswitch/files/ovs-vswitchd2.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=-/run/openvswitch/useropts
+EnvironmentFile=-/etc/conf.d/ovs-vswitchd
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovsdb-server --no-monitor --system-id=random \
+ ${OVSUSER} 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 ${OVSUSER} restart $OPTIONS
+TimeoutSec=300
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/openvswitch/files/ovsdb-server2.service b/net-misc/openvswitch/files/ovsdb-server2.service
new file mode 100644
index 00000000000..5ff6f904466
--- /dev/null
+++ b/net-misc/openvswitch/files/ovsdb-server2.service
@@ -0,0 +1,24 @@
+[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
+ExecStartPre=/bin/sh -c 'rm -f /run/openvswitch/useropts; if [ "$${OVS_USER_ID/:*/}" != "root" ]; then /usr/bin/echo "OVSUSER=--ovs-user=${OVS_USER_ID}" > /run/openvswitch/useropts; fi'
+EnvironmentFile=-/run/openvswitch/useropts
+ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
+ --no-ovs-vswitchd --no-monitor --system-id=random \
+ ${OVSUSER} \
+ start $OPTIONS
+ExecStop=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd stop
+ExecReload=/usr/share/openvswitch/scripts/ovs-ctl --no-ovs-vswitchd \
+ ${OVSUSER} \
+ --no-monitor restart $OPTIONS
+RuntimeDirectory=openvswitch
+RuntimeDirectoryMode=0755
diff --git a/net-misc/openvswitch/files/ovsdb-server_conf2 b/net-misc/openvswitch/files/ovsdb-server_conf2
index 97367b9717e..07eca5e6c9f 100644
--- a/net-misc/openvswitch/files/ovsdb-server_conf2
+++ b/net-misc/openvswitch/files/ovsdb-server_conf2
@@ -9,6 +9,9 @@ PRIVATE_KEY="db:Open_vSwitch,SSL,private_key"
CERTIFICATE="db:Open_vSwitch,SSL,certificate"
BOOTSTRAP_CA_CERT="db:Open_vSwitch,SSL,ca_cert"
+# Default user
+OVS_USER_ID="root:root"
+
# Alternative path for the database (default is /etc/openvswitch/conf.db)
# DATABASE="/etc/openvswitch/conf.db"