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

Re: Bug#225465: debian-policy: packages must give choice to notstart at boot, via debconf

This one time, at band camp, Anthony DeRobertis said:
> Fix the package to use invoke-rc.d in its maintainer scripts, then do 
> your don't-run-at-upgrade policy from invoke-rc.d
> Look in the invoke-rc.d manpage, under 'INIT SCRIPT POLICY'. Is that 
> what you're looking for?

That's what I had hoped for, but:

if [ -x "/etc/init.d/hdparm" ]; then
        update-rc.d hdparm start 07 S . >/dev/null
        if [ -x /usr/sbin/invoke-rc.d ]; then
                invoke-rc.d hdparm start
                /etc/init.d/hdparm start

Setting up hdparm (5.4-8) ...
+ '[' -x /etc/init.d/hdparm ']'
+ update-rc.d hdparm start 07 S .
+ '[' -x /usr/sbin/invoke-rc.d ']'
+ invoke-rc.d hdparm start
+ set -e
+ echo -n 'Setting disc parameters:'

. . .

The script is run.

and from /usr/share/doc/sysv-rc/README.policy-rc.d.gz:

To shield policy-rc.d of the underlying initscript system (file-rc, links in
/etc/rc?.d or something else), invoke-rc.d implements the following built-in

  1. action "start" out of runlevel is denied,
     (policy-rc.d receives action "(start)" instead of "start");
  2. action "restart" out of runlevel is denied,
     (policy-rc.d receives action "(restart)" instead of "restart");

So I thought that it should not start once out of S and into runlevel 2,
but it clearly does.  That's why I assumed I was misthinking, and set
about looking for another way to do this.  

Am I still mis-reading, or is this behavior not what is expected?  I 
don't seem to have the file /usr/sbin/policy-rc.d mentioned in the same 
readme, so perhaps that's the problem.  apt-file doesn't return anything 
on it, and packages.d.o is still down, so I'm not sure what needs 
installing to test further.

Thanks for everything so far,
|   ,''`.					     Stephen Gran |
|  : :' :					 sgran@debian.org |
|  `. `'			Debian user, admin, and developer |
|    `-					    http://www.debian.org |

Attachment: pgpk2eAG5x6jQ.pgp
Description: PGP signature

Reply to: