Package: openrc
Version: 0.40.3-1

When installing an OpenRC initscript from a package that has no LSB
headers, there is some wrong logic happening.

The initscript in question looks like this: 
https://raw.githubusercontent.com/maemo-leste/droid4-pm/master/scripts/openrc/droid4-pm

The shell output:

# dpkg -i droid4-powermanagement_1.0.4_all.deb
Selecting previously unselected package droid4-powermanagement.
(Reading database ... 44922 files and directories currently installed.)
Preparing to unpack droid4-powermanagement_1.0.4_all.deb ...
Unpacking droid4-powermanagement (1.0.4) ...
Setting up droid4-powermanagement (1.0.4) ...
insserv: warning: script 'droid4-powermanagement' missing LSB tags
insserv: warning: script 'droid4-powermanagement' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script 
`droid4-powermanagement'
insserv: Default-Stop  undefined, assuming empty stop  runlevel(s) for script 
`droid4-powermanagement'
Use of uninitialized value $_ in hash element at /usr/sbin/update-rc.d line 88.
Use of uninitialized value in system at /usr/sbin/update-rc.d line 283.

In my opinion, insserv shouldn't warn about missing LSB headers if it is
an OpenRC initscript (and OpenRC itself is installed). Further on,
insserv is unable to figure out the runlevel, and doesn't even default
to the 'default' runlevel, but it rather decides to install it into an
empty runlevel. This is not the expected Debian behavior where new
initscripts should end up in the default runlevel upon installation.

Proposed solutions:

* Make insserv not warn about missing LSB headers if the shebang is
  `#!/sbin/openrc-init` and OpenRC is installed.
* If unable to figure out a runlevel from `depend()`, then install the
  initscript in the 'default' runlevel with: `rc-update add $foo default`

Reply via email to