> -----Original Message----- > From: > [email protected] > g > [mailto:[email protected] sktop.org] On Behalf Of Reindl Harald > Sent: Monday, November 21, 2011 16:09 > To: [email protected] > 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" <[email protected]> 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@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 [email protected] http://www.rosemike.net/ _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
