Bug 113088 - init.d/halt contains wrong unmounting code
Summary: init.d/halt contains wrong unmounting code
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-08 13:11 UTC by Gianni Giardina
Modified: 2014-03-17 02:41 UTC (History)
2 users (show)

Fixed In Version: 7.47-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-17 02:25:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to be added in the SOURCE directory of source rpm. (449 bytes, patch)
2004-01-08 13:16 UTC, Gianni Giardina
no flags Details | Diff

Description Gianni Giardina 2004-01-08 13:11:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1)
Gecko/20030225

Description of problem:
The init.d/halt script contains wrong unmounting code. This code
should try to unmount all file systems other than root and RAM disks,
one last time before remounting the remaining filesystems readonly.

What's wrong is a typo in an awk program string on line 176. I send in
attachment a patch to be added in the SOURCE directory of the source rpm.

Version-Release number of selected component (if applicable):
initscripts-7.42-1

How reproducible:
Always

Steps to Reproduce:
1. Get line 176 of the init.d/halt script:

# sed '1,175d ; 177,$d' /etc/rc.d/rc.d/init.d/halt
mount |  awk '/!( \/ |^\/dev\/root|^\/dev\/ram)/ { print $3 }' | \

2. do this (the original wrong code)

# mount |  awk '/!( \/ |^\/dev\/root|^\/dev\/ram)/ { print $3 }'

3. and now do this, instead (what the code should be)

# mount |  awk '!/( \/ |^\/dev\/root|^\/dev\/ram)/ { print $3 }'

Actual Results:  In step 2 you obtain nothing.
In step 3 you obtain all your mounted filesystems other than '/' and
'/dev/ram'.

Expected Results:  I expect the code on line 176 returns what the
comment on the preceding line says: "Try all file systems other than
root and RAM disks, one last time".

Additional info:

Comment 1 Gianni Giardina 2004-01-08 13:16:25 UTC
Created attachment 96827 [details]
Patch to be added in the SOURCE directory of source rpm.

Comment 2 Terry Griffin 2004-02-11 16:52:04 UTC
This bug caused one of my systems to hang on shutdown when it
tried to do the unmounting. Applying the fix from Gianni Giardina
eliminated the hang problem. Now I get proper shutdowns.


Comment 3 Bill Nottingham 2004-03-17 02:25:30 UTC
Fixed, will be in 7.47-1 - thanks!


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