[arch-general] On-boot delay due to timer units
Alexandre de Verteuil
claudelepoisson at gmail.com
Wed Apr 30 23:26:43 EDT 2014
* Thomas Bächler <thomas at archlinux.org> [2014-04-17 21:31] :
> I think another solution in systemd would be introducing a holdoff time:
> Instead of running immediately on boot, the timer should be scheduled
> for boot+5min.
>
> This requires some investigation - sorry, I don't have a quick solution
> right now.
Hi,
I'm experiencing the same problem caused by updatedb launching on
boot. This fixes it until the desired feature is added to systemd.timer:
## /etc/systemd/system/updatedb.service.d/delay.conf
[Service]
# Trick to avoid launching updatedb when the system is booted.
ExecStartPre=-/usr/bin/bash -c '[ $(cut -d. -f1 /proc/uptime) -lt 120 ] && sleep 120'
## EOF
If the system is up since less than 120 seconds, waits 120 seconds. Also,
failure does not prevent running ExecStart= given the "-" before the
command line.
Best regards,
--
Alexandre de Verteuil <claudelepoisson at gmail.com>
public key ID : 0xDD237C00
http://alexandre.deverteuil.net/
More information about the arch-general
mailing list