Bug 113088 - init.d/halt contains wrong unmounting code
init.d/halt contains wrong unmounting code
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-08 08:11 EST by Gianni Giardina
Modified: 2014-03-16 22:41 EDT (History)
2 users (show)

See Also:
Fixed In Version: 7.47-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-16 21:25:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Gianni Giardina 2004-01-08 08:11:26 EST
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 08:16:25 EST
Created attachment 96827 [details]
Patch to be added in the SOURCE directory of source rpm.
Comment 2 Terry Griffin 2004-02-11 11:52:04 EST
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-16 21:25:30 EST
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.