Bug 496861 - [RFE] call halt.local from /etc/init.d/halt with parameters
Summary: [RFE] call halt.local from /etc/init.d/halt with parameters
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 516998 554392
TreeView+ depends on / blocked
 
Reported: 2009-04-21 13:49 UTC by Marc Grimme
Modified: 2014-03-17 03:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 554392 (view as bug list)
Environment:
Last Closed: 2012-06-05 15:16:11 UTC
Type: ---
Embargoed:


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 13:51 UTC, 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 12:23 UTC, Václav Pavlín
no flags Details | Diff

Description Marc Grimme 2009-04-21 13:49:57 UTC
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 13:51:03 UTC
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 22:29:21 UTC
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 06:25:51 UTC
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 15:16:11 UTC
We don't have /etc/init.d/halt anymore, so closing.

Comment 7 Václav Pavlín 2012-08-01 12:23:54 UTC
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.