Add a prestart line to change ownership of openvswitch dirs
The openvswitch dirs should be owned by the user running the
openvswitch and ovsdb-server processes. This is controller
either by contents of default.conf or /etc/config/openvswitch file.
@@ -4,3 +4,6 @@ dropins:
contents: |
[Service]
Restart=always
+ ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /var/lib/openvswitch'
+ ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /etc/openvswitch'
+ ExecStartPre=-/bin/sh -c '/usr/bin/chown -R :$${OVS_USER_ID##*:} /run/openvswitch'
