Re: On-boot delay due to timer units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



* Thomas Bächler <thomas@xxxxxxxxxxxxx> [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@xxxxxxxxx>
public key ID : 0xDD237C00
http://alexandre.deverteuil.net/


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux