mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
Systemd unit file generates warnings about PID file path since /var/run is a legacy path so just use /run instead of /var/run. /var/run is a symlink of /run starting from RHEL7 (and any other distribution that uses systemd). Reported-at: https://bugzilla.redhat.com/1952081 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
33 lines
1.1 KiB
SYSTEMD
33 lines
1.1 KiB
SYSTEMD
[Unit]
|
|
Description=Open vSwitch Forwarding Unit
|
|
After=ovsdb-server.service network-pre.target systemd-udev-settle.service
|
|
Before=network.target network.service
|
|
Requires=ovsdb-server.service
|
|
ReloadPropagatedFrom=ovsdb-server.service
|
|
AssertPathIsReadWrite=/run/openvswitch/db.sock
|
|
PartOf=openvswitch.service
|
|
|
|
[Service]
|
|
Type=forking
|
|
PIDFile=/run/openvswitch/ovs-vswitchd.pid
|
|
Restart=on-failure
|
|
Environment=XDG_RUNTIME_DIR=/run/openvswitch
|
|
EnvironmentFile=/etc/openvswitch/default.conf
|
|
EnvironmentFile=-/etc/sysconfig/openvswitch
|
|
EnvironmentFile=-/run/openvswitch.useropts
|
|
LimitSTACK=2M
|
|
@begin_dpdk@
|
|
ExecStartPre=-/bin/sh -c '/usr/bin/chown :$${OVS_USER_ID##*:} /dev/hugepages'
|
|
ExecStartPre=-/usr/bin/chmod 0775 /dev/hugepages
|
|
@end_dpdk@
|
|
ExecStart=/usr/share/openvswitch/scripts/ovs-ctl \
|
|
--no-ovsdb-server --no-monitor --system-id=random \
|
|
${OVS_USER_OPT} \
|
|
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_OPT} \
|
|
restart $OPTIONS
|
|
TimeoutSec=300
|