Bug 496861 - [RFE] call halt.local from /etc/init.d/halt with parameters
[RFE] call halt.local from /etc/init.d/halt with parameters
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 516998 554392
  Show dependency treegraph
 
Reported: 2009-04-21 09:49 EDT by Marc Grimme
Modified: 2014-03-16 23:18 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 554392 (view as bug list)
Environment:
Last Closed: 2012-06-05 11:16:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
This patch changes /etc/init.d/halt so that it calls halt.local with some parameters defined in /etc/init.d/halt (307 bytes, patch)
2009-04-21 09:51 EDT, Marc Grimme
no flags Details | Diff
Changes /etc/init.d/halt to call halt.local with variables used in halt as parameters. (763 bytes, patch)
2012-08-01 08:23 EDT, Václav Pavlín
no flags Details | Diff

  None (edit)
Description Marc Grimme 2009-04-21 09:49:57 EDT
Description of problem:
/etc/init.d/halt calls if it exists /sbin/halt.local. It would be nice to have parameters like "$message" "$HALTARGS" "$kexec_command" "$command" being passed to /sbin/halt.local. This leads to a /sbin/halt.local with better knowledge of how it was called.

Version-Release number of selected component (if applicable):
rhel5, fedora

How reproducible:
Create a /sbin/halt.local and you never know if it should reboot or not.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
halt.local should somehow know if it should be called as reboot or halt or power off. Therefore parameters might be an idea.

Expected results:
halt.local should be aware of that.

Additional info:
Comment 1 Marc Grimme 2009-04-21 09:51:03 EDT
Created attachment 340527 [details]
This patch changes /etc/init.d/halt so that it calls halt.local with some parameters defined in /etc/init.d/halt
Comment 2 Bill Nottingham 2009-04-21 18:29:21 EDT
Well, the idea is that halt.local isn't necessarily doing all those things itself, so it shouldn't need that much information; it should not need to care about kexec, or what messages to echo, etc. But some of it could be useful.
Comment 3 Marc Grimme 2009-04-22 02:25:51 EDT
I agreed. I just added all parameters to halt.local that are defined in halt. But I agree "$message" and "$HALTARGS" are enough.
Comment 6 Lukáš Nykrýn 2012-06-05 11:16:11 EDT
We don't have /etc/init.d/halt anymore, so closing.
Comment 7 Václav Pavlín 2012-08-01 08:23:54 EDT
Created attachment 601731 [details]
Changes /etc/init.d/halt to call halt.local with variables used in halt as parameters.

halt.local is called with $message, $command, $HALTARGS and $kexec_command parameters in this patch.

First three parameters have always some value, but $kexec_command is set only if $command is "reboot".

I also moved definition of $HALTARGS above the halt.local call, because otherwise it would be always unset.

Note You need to log in before you can comment on or make changes to this bug.