|Summary:||/etc/init.d/halt should call halt.local before remounting read-only|
|Product:||[Fedora] Fedora||Reporter:||Thomas M Steenholdt <tmus>|
|Component:||initscripts||Assignee:||Bill Nottingham <notting>|
|Status:||CLOSED RAWHIDE||QA Contact:||Brock Organ <borgan>|
|Fixed In Version:||8.22-1||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2006-01-31 21:38:34 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description Thomas M Steenholdt 2006-01-30 07:35:26 UTC
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:184.108.40.206) Gecko/20060123 Fedora/220.127.116.11rc1-0.tmus.1 Firefox/18.104.22.168 Description of problem: /etc/init.d/halt calls a halt.local file that allows administrators to handle special stuff during the halt sequence. However, halt.local is called only after all filesystems have been remounted read-only, so it's not possible, from halt.local to make changes to shutdown behaviour (eg. touch /halt). And if really would make sense if that was possible, since the halt.local code is executed before the check for /halt and /poweroff My particular task here is to check if the halt/poweroff currently in progress has been initiated by my UPS software (apcupsd) and if so, make sure the system halts without powering off. There are probably a lot of other scenarios, where people would want to do something on the filesystem from a file like this and it should be fairly easy to accomodate, we just have to choose one of to posibilities... 1) simply move the halt.local(perhaps the built-in UPS code too?) code to before the remounting. 2) add an additional halt.local(eg. halt.rwlocal or whatever) call before remounting. This suggestion depends on what is the thought purpose of having the halt.local in the first place, perhaps 1) is the better choice? Version-Release number of selected component (if applicable): initscripts-8.21-1 How reproducible: Always Steps to Reproduce: 1. add touch /halt to /sbin/halt.local and chmod +x it 2. poweroff Actual Results: complaints that it cannot touch the file on a readonly filesystem Expected Results: It should be able to create the flag files at this point in time Additional info:
Comment 1 Bill Nottingham 2006-01-30 18:22:58 UTC
Well, you could argue that you can remount / rw in halt.local, and then remount it ro when you're done. But that's overkill.
Comment 2 Thomas M Steenholdt 2006-01-30 18:55:58 UTC
You're absolutely right - but that feels like a nasty hack to me - If we can come up with a nicer way to make this work for all or at least most of the stuff that someone would think of putting in a .local mod like this, if would be much nicer!
Comment 3 Bill Nottingham 2006-01-31 21:38:34 UTC
Fixed in 8.22-1.