Mailinglist Archive: opensuse (1658 mails)

< Previous Next >
Re: [opensuse] Re: [opensuse-factory] equivalent to boot.local for systemd
On 07/12/11 00:47, John Andersen wrote:
On 12/6/2011 7:42 PM, Cristian Rodríguez wrote:
On 07/12/11 00:33, James Knott wrote:
Andreas Jaeger wrote:
So far putting these into boot.local works fine, but my reading of
boot.local's use suggests it might be executed at most any point in
the boot process, and after.local's used to be executed after the run
level was reached.
You can create separate service for these, there shouldn't be a
problem...

So, what is the proper replacement for things that must be started after
the system is up& running? On my firewall, I use after.local to start a
6in4 tunnel after booting, as it requires the network to be up first.

[Unit]
Description=My 6to4 tunnel
After=network.target

[Service]
Type=oneshot
ExecStart=/path/to/script/starting_the_tunnel.sh

[Install]
WantedBy=multi-user.target


Aint that cute ? ;-)

Yes, but where does it go?

after.local?

After.local hack is still supported by editing /etc/init.d/after.local ... if you want to use the script I suggest above create it in a file named my6to4tunnel.service in directory /etc/systemd/system , issue systemctl --system daemon-reload then start the service with systemctl start my6to4tunnel.service, if you want it at boot time, issue systemctl enable my6to4tunnel.service






--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >