Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #247156
| From | Darac Marjal <mailinglist@darac.org.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: updatedb.mlocate |
| Date | 2022-04-10 16:50 +0200 |
| Message-ID | <EaH33-7OT7-7@gated-at.bofh.it> (permalink) |
| References | <EamhY-7BUL-13@gated-at.bofh.it> <EawU1-7IHY-3@gated-at.bofh.it> <EaCd3-7M2v-3@gated-at.bofh.it> <EaCG5-7MrF-5@gated-at.bofh.it> <EaGTn-7OPF-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On 10/04/2022 15:29, Greg Wooledge wrote: > On Sun, Apr 10, 2022 at 06:03:13AM -0400, gene heskett wrote: >> Thats fine, as long as the systemd stuff is disabled by finding an entry >> in the presently logged in users ~/.config, but I do not consider that as >> a user item. thats (updatedb) sysadmin stuff, and much of this hoohah >> could be prevented by setting the trigger time at install time with a >> random time between 1 and 4 AM when most users are inactive anyway. How >> many lines of bash code would it take to do that, 3? 4? IDK but it could >> be done... > The mlocate package includes a /lib/systemd/system/mlocate.timer file. > It's static content. If the package maintainer wanted to randomize the > contents, they would need to write code in the mlocate.postinst script > to change the static file -- which is a really BAD idea. A slightly > better idea: don't include the static file at all, but include code in > the mlocate.postinst which generates a randomized mlocate.timer file. > > The mlocate.postinst script is not a bash script. It's an sh script. > So, the "obvious" way to do it in bash (a here document with $((RANDOM%...)) > expressions in it) won't work. They would need to call out to some > external process (perhaps awk) to generate some random numbers, store > those in variables, and then use the variables in the here document. > > They would also need to arrange for the randomized mlocate.timer file > to be cleaned up when the package is removed, so that's even more code > to write. > > Kind of a pain in the ass. > > Even if randomizing the times is more trouble than it's worth, I wonder > how much support might exist for simply specifying a different static time > for each package that currently runs at midnight. E.g. have mlocate > run at 00:05, have man-db run at 00:10, have logrotate run at 00:15, > and so on. I don't know how many different timers all run at midnight -- > just the ones that *I* happen to have. There are probably lots more. Systemd already supports this. * AccuracySec= Specify the accuracy the timer shall elapse with. [...] Within this time window, the expiry time shall be placed at a host-specific, randomized, but stable position. * RandomizedDelaySec = Delay the timer by a randomly selected, evenly distributed amount of time between 0 and the specified time value. So, "OnCalendar=daily" together with "AccuracySec=24h" *seems* to imply "once per day, but at a random time during the day". >
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
updatedb.mlocate "Roy J. Tellason, Sr." <roy@rtellason.com> - 2022-04-09 18:40 +0200
Re: updatedb.mlocate Roberto C. Sánchez <roberto@debian.org> - 2022-04-09 18:50 +0200
Re: updatedb.mlocate Brian <ad44@cityscape.co.uk> - 2022-04-09 19:00 +0200
Re: updatedb.mlocate "sp007@caiway.net" <sp007@caiway.net> - 2022-04-09 19:30 +0200
Re: updatedb.mlocate Brian <ad44@cityscape.co.uk> - 2022-04-09 19:40 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-09 20:10 +0200
Re: updatedb.mlocate "Roy J. Tellason, Sr." <roy@rtellason.com> - 2022-04-10 16:40 +0200
Re: updatedb.mlocate Charles Curley <charlescurley@charlescurley.com> - 2022-04-09 19:30 +0200
Re: updatedb.mlocate "Roy J. Tellason, Sr." <roy@rtellason.com> - 2022-04-10 16:50 +0200
Re: updatedb.mlocate David Wright <deblis@lionunicorn.co.uk> - 2022-04-11 01:30 +0200
Re: updatedb.mlocate gene heskett <gheskett@shentel.net> - 2022-04-09 21:50 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-09 22:40 +0200
Re: updatedb.mlocate gene heskett <gheskett@shentel.net> - 2022-04-09 23:00 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-09 23:20 +0200
Re: updatedb.mlocate "Roy J. Tellason, Sr." <roy@rtellason.com> - 2022-04-10 17:00 +0200
Re: updatedb.mlocate Charles Curley <charlescurley@charlescurley.com> - 2022-04-10 05:30 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-10 06:00 +0200
Re: updatedb.mlocate <tomas@tuxteam.de> - 2022-04-10 08:10 +0200
Re: updatedb.mlocate Linux-Fan <Ma_Sys.ma@web.de> - 2022-04-10 11:40 +0200
Re: updatedb.mlocate gene heskett <gheskett@shentel.net> - 2022-04-10 12:10 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-10 16:40 +0200
Re: updatedb.mlocate Darac Marjal <mailinglist@darac.org.uk> - 2022-04-10 16:50 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-10 18:10 +0200
Re: updatedb.mlocate David Wright <deblis@lionunicorn.co.uk> - 2022-04-10 20:50 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-10 16:10 +0200
Re: updatedb.mlocate gene heskett <gheskett@shentel.net> - 2022-04-10 22:40 +0200
Re: updatedb.mlocate David Wright <deblis@lionunicorn.co.uk> - 2022-04-11 01:30 +0200
Re: updatedb.mlocate David <bouncingcats@gmail.com> - 2022-04-11 01:40 +0200
Re: updatedb.mlocate Greg Wooledge <greg@wooledge.org> - 2022-04-11 02:00 +0200
Re: updatedb.mlocate David <bouncingcats@gmail.com> - 2022-04-11 02:20 +0200
csiph-web