Hello,
Adam D. Barratt [17/Jan 2:59pm GMT] wrote:
> On Sat Jan 17 14:46:04 2026, adsb wrote:
>> FWIW the relevant part of our reboot scripts is:
>>
>> screen -S reboot-job -d -m sh -c 'sleep ${minwait}m ; flock
>> /var/run/reboot-lock true; /sbin/shutdown -r 10 \"Kernel (mass) reboot
>> issued by `whoami`.\" < /dev/null '
>>
>> Are you able to determine when you should have taken the lock? If I'm
>> reading things correctly, what /could/ happen is:
>>
>> T: Reboot scripts manage to obtain lock, and schedule reboot for 10
>> minutes later. The lock is only held for the duration of the
>> invocation of "true".
>> T+X: tag2upload jobs obtain lock, unaware of the already scheduled
>> reboot
>> T+10: Reboot
>
> Aurelien pointed out that molly-guard, as /sbin/shutdown, will acquire
> the lock itself, so this seems unlikely.
Hmm, but will it hold it for the whole ten minutes?
--
Sean Whitton