[systemd-devel] openvpn: tap0 & br0 missing

Michael D. Berger m.d.berger at ieee.org
Mon Nov 21 13:19:12 PST 2011


> -----Original Message-----
> From: 
> systemd-devel-bounces+m.d.berger=ieee.org at lists.freedesktop.or
> g 
> [mailto:systemd-devel-bounces+m.d.berger=ieee.org at lists.freede
sktop.org] On Behalf Of Reindl Harald
> Sent: Monday, November 21, 2011 16:09
> To: systemd-devel at lists.freedesktop.org
> Subject: Re: [systemd-devel] openvpn: tap0 & br0 missing
> 
> 
> 
> Am 21.11.2011 21:49, schrieb Miklos Vajna:
> > On Mon, Nov 21, 2011 at 01:18:08PM -0500, "Michael D. 
> Berger" <m.d.berger at ieee.org> wrote:
> >> What might I put in the .service file to assure that my 
> script is run 
> >> as late in the startup sequence as possible? I'm thinking about a 
> >> "sleep 1" at the beginning of the script itself.
> > 
> > SysVStartPriority=99 in the Service section can do it. But it's a 
> > hack, the solution is to depend on the right targets (or 
> just handle 
> > the lack of network, etc on start in the daemon in question).
> 
> this is really the smallest problem
> afaik in F14 there was also no "magic script" for the 
> bridge-configuration
> 
> [root at srv-rhsoft:~]$ cat /lib/systemd/system/openvpn.service
> [Unit]
> Description=OpenVPN
> After=network.target
> [Service]
> Type=forking
> PIDFile=/var/run/openvpn/openvpn.pid
> ExecStartPre=-/etc/init.d/openvpn-bridge start 
> ExecStart=/usr/sbin/openvpn --daemon --writepid 
> /var/run/openvpn/openvpn.pid --cd /etc/openvpn/ --config 
> openvpn.conf ExecStopPost=-/etc/init.d/openvpn-bridge stop 
> Restart=always
> RestartSec=1
> [Install]
> WantedBy=multi-user.target
> 
>
Actually, on my system it is a little more complicated.
It appears that network.service has to be restarted
after the vpn stuff is stopped.  Also, in my case,
a sed modification of /etc/sysconfig/iptables and a
restart of iptables is necessary.

Mike.
--
Michael D. Berger
m.d.berger at ieee.org
http://www.rosemike.net/
   



More information about the systemd-devel mailing list