[systemd-devel] openvpn: tap0 & br0 missing

Reindl Harald h.reindl at thelounge.net
Mon Nov 21 13:46:17 PST 2011



Am 21.11.2011 22:19, schrieb Michael D. Berger:
> 
>> -----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.

but what prevents you to define as much services / scripts as you need
in /etc/systemd/system with as much ExecStartPre and Before/After
declarations you need?

i can not imagine how any sysv-init of openvpn ever fullfilled
practical needs since my hardest part with openvpn was
to configure/start the bridge-interfaces which is a trivial
task after you have done this once, but not so easy as start

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20111121/1793f367/attachment.pgp>


More information about the systemd-devel mailing list