:: Re: [DNG] [Dng] epoch feature reque…
Inizio della pagina
Delete this message
Reply to this message
Autore: Isaac Dunham
Data:  
To: Hendrik Boom
CC: dng
Oggetto: Re: [DNG] [Dng] epoch feature request
On Tue, Jun 16, 2015 at 11:42:37AM -0400, Hendrik Boom wrote:
> On Tue, Jun 16, 2015 at 07:40:18AM -0700, Isaac Dunham wrote:
> > But watching for file creation seems like a case of refusing to work
> > with the package manager.
>
> Not quite... it lets you reread them if the sysadmin moodifies them.


That's going to end up even more broken. Consider these cases:
- You are in the middle of modifying an init script, and write it to
disk (as a savepoint).

The hypothetical patched epoch would pick up the write and reload an
incomplete, possibly broken, init script.
Additionally, it might also pick up a backup or swap file (.*.swp, *~,
and a whole lot of other possibilities).

-As above, but you write to disk so you can do a dry-run with insserv
or equivalent, to see whether you got ordering correct.

- You install epoch. Somewhere along the line, you replace a bunch of
packages with different ones, while epoch isn't running.
Then you reboot with init=.../epoch

If you used inotify as the trigger for updating epoch, you'll get
a massive failure: none of the package changes get picked up.

There is a way to avoid all that:
Have a *separate* tool, so the system administrator can update it when
desired. (By separate, I mean 'not in the same binary, probably in the
same package'.)
Have a dry-run feature in the tool, so the system administator can
tell whether fixes need to be made without changing the configuration
for init.
And have a dpkg trigger, so the system administrator doesn't have to
manually intervene after each session in apt.
If someone's concerned about automatically picking up built-from-source
packages or manual edits to init scripts, it's trivial to add a rule
to incron that would run the script automatically.

HTH,
Isaac Dunham