Ticket #133 (closed defect: wontfix)

Opened 20 months ago

Last modified 20 months ago

the Gentoo's kexec init script stopped working after upgrade to openrc-4.0

Reported by: Vladimir Owned by: roy
Priority: major Milestone:
Component: rc Version: 0.4
Keywords: Cc:

Description

If you would like to load new kernel for kexec during shutdown, the kexec init scripts detects "reboot" runlevel as "shutdown". Here's the snip from the kexec script:

    ebegin "Configuring kexec"
    if [ "${RC_SOFTLEVEL:-${SOFTLEVEL:-${RC_RUNLEVEL:-${RUNLEVEL}}}}" != "reboot" ]; then
        einfo "Not rebooting, so disabling"
        kexec -u
        return 0
    fi

The variable ${RC_SOFTLEVEL:-${SOFTLEVEL:-${RC_RUNLEVEL:-${RUNLEVEL}}}} is "shutdown" while you are rebooting PC.

Change History

comment:1 Changed 20 months ago by Matthias Schwarzott <zzam@gentoo.org>

Either openrc needs changes to still return runlevel reboot even if it uses shutdown internally, or the init-script needs to be changed to check the output of /sbin/runlevel.

comment:2 Changed 20 months ago by roy

  • Status changed from new to closed
  • Resolution set to wontfix

OpenRC no longer uses the restart reboot runlevel as not all init systems inform OpenRC if the reboot intent. All we know is that we are .html"shutting down."

As Matthias pointed out, you can use the /sbin/runlevel command or parse the RUNLEVEL and PREVLEVEL env vars set by sysvinit.

Note: See TracTickets for help on using tickets.