Hi Marc,

Marc Haber <[email protected]> writes:

> Package: needrestart
> Version: 2.11-3
> Severity: wishlist
>
> Dear Maintainer,
>
> during automated processes, such as puppet runs or automated upgrades,
> it is sometimes acceptable to restart daemons without asking. In this
> case, I would like to have my system return to the normal way of
> operation after the automated processing. It would, therefore, be not a
> good idea to actually modify /etc/apt/apt.conf.d/99needrestart because
> one would need to re-edit the file to its original state.
>
> Would it be possible to have /usr/lib/needrestart/apt-pinvoke source a
> (normally not existing) /etc/needrestart.conf where one could put the
> options in? or even an /etc/needrestart.d where one could drop a file
> and remove it afterwards?

you could extend needrestart's configuration by putting a file into
/etc/needrestart/conf.d/. Since the config files are sourced perl
scripts it would be even possible to test for env variables or existing
of files and change the configuration dynamicly. Does this already solve
your request? There is already support for an environment variable
("NEEDRESTART_SUSPED") to temporary deactivate needrestart. Do you think
there should be support for another variable like "NEEDRESTART_MODE" to
be able to override the configured mode?


> In the mean time, I have added an 98needrestart which calls apt-pinvoke
> -r a, but this of course means that needrestart runs twice - once
> noninteractively, doing the necessary restarts, and a second time
> interactively with (hopefully) nothing to do. Is this
> intended/acceptable use?

There are some fixes in the upcomming needrestart 2.12 release fixing
the detection of non-interactive runs and enable list only mode in case
interactive mode is configured (which is the default). See also Debian
Bug#842512.


Regards,
Thomas


> Greetings
> Marc
>
> -- Package-specific info:
> needrestart output:
>
> checkrestart output:
>
>
> -- System Information:
> Debian Release: 9.0
>   APT prefers unstable
>   APT policy: (500, 'unstable')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.11.6-zgws1 (SMP w/4 CPU cores)
> Locale: LANG=en_DK.utf8, LC_CTYPE=en_DK.utf8 (charmap=UTF-8), LANGUAGE=en_US 
> (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages needrestart depends on:
> ii  dpkg                       1.18.24
> ii  gettext-base               0.19.8.1-2
> ii  libintl-perl               1.26-2
> ii  libmodule-find-perl        0.13-1
> ii  libmodule-scandeps-perl    1.23-1
> ii  libproc-processtable-perl  0.53-2
> ii  libsort-naturally-perl     1.03-1
> ii  libterm-readkey-perl       2.37-1
> ii  perl                       5.24.1-3
> ii  xz-utils                   5.2.2-1.2+b1
>
> Versions of packages needrestart recommends:
> ii  libpam-systemd  232-25
>
> Versions of packages needrestart suggests:
> pn  needrestart-session | libnotify-bin  <none>
>
> -- no debconf information
>

-- 

    ::  WWW:                        https://fiasko-nw.net/~thomas/  ::
   :::  Jabber:                   xmpp:[email protected]  :::
    ::  flickr:             https://www.flickr.com/photos/laugufe/  ::

Reply via email to