On Sun, 01.12.13 00:10, [email protected] ([email protected]) wrote:

> I'm using an openvpn unit,
> 
>       cat openvpn.service
>               [Unit]
>               Description=OpenVPN
>               After=syslog.target network.target
>               Before=openvpn.target
> 
>               [Service]
>               PrivateTmp=true
>               Environment=PATH="/usr/local/openvpn-unpriv:$PATH"

Unit files are not shell. This won't work.

> with the ExecStartPre= script,
> 
>       cat /usr/local/etc/openvpn/up.script
> 
>               #!/bin/sh
>               /usr/local/sbin/openvpn --rmtun --dev tun1 > /dev/null
>               2>&1
>               /usr/local/sbin/openvpn --mktun --dev tun1 --dev-type
>               tun --user openvpn --group openvpn
>               /usr/sbin/iptables -I FORWARD -i eth0 -o tun1 -j ACCEPT
>               /usr/sbin/iptables -I FORWARD -i tun1 -o eth0 -j ACCEPT

I am not sure what thos openvpn calls do. If they fork something in the
background, please be aware that systemd will kill that before
proceeding.

Maybe there's a race bewteen the openvpn and iptables commands in that
the interfaces are not finished creating when iptables is started and
then not found.

To debug this further use "set -x" or so, to make your shell log
whatever it does. systemd will pick that up and forward it to syslog.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to