Bug 189695 - /etc/init.d/halt has problems with mountpoints containing spaces
/etc/init.d/halt has problems with mountpoints containing spaces
Status: CLOSED DUPLICATE of bug 186713
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-04-23 06:33 EDT by Vladimir Kotal
Modified: 2014-03-16 22:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-25 11:07:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot of /etc/init.d/halt failing (118.46 KB, image/jpeg)
2006-04-23 06:33 EDT, Vladimir Kotal
no flags Details
another screenshot showing actual end of halt procedure (117.30 KB, image/jpeg)
2006-04-23 06:35 EDT, Vladimir Kotal
no flags Details

  None (edit)
Description Vladimir Kotal 2006-04-23 06:33:05 EDT
Description of problem:

during execution of /etc/init.d/halt on system with mountpoints which contain
spaces, errors are printed. As a result of halt script not counting with
mounpoints with spaces, these mounts are not unmounted properly upon halting the
system.

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

initscripts-8.31.1-1

How reproducible:

setup mounts which contain spaces and halt the system

Steps to Reproduce:
1. setup mounts with spaces
2. execute halt
  
Actual results:

errors are printed (see attached files)

Expected results:

mounts should be unmounted properly

Additional info:
Comment 1 Vladimir Kotal 2006-04-23 06:33:05 EDT
Created attachment 128127 [details]
screenshot of /etc/init.d/halt failing
Comment 2 Vladimir Kotal 2006-04-23 06:35:31 EDT
Created attachment 128128 [details]
another screenshot showing actual end of halt procedure
Comment 3 Vladimir Kotal 2006-04-23 06:36:56 EDT
mount(8) output on the system:

[katka@erazim ~]$ mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda1 on /home/media type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
automount(pid2188) on /net type autofs
(rw,fd=4,pgrp=2188,minproto=2,maxproto=4)/dev/sdc1 on /media/WD USB 2 type vfat
(rw,noexec,nosuid,nodev,shortname=winnt,uid=501)
/dev/sdb2 on /media/My iPod type vfat
(rw,noexec,nosuid,nodev,shortname=winnt,uid=501)
Comment 4 Vladimir Kotal 2006-04-23 06:39:40 EDT
the problem is in following piece of code in /etc/init.d/halt script:

# Unmount file systems, killing processes if we have to.
# Unmount loopback stuff first
remaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $2}' /proc/mounts`
devremaining=`awk '$1 ~ /^\/dev\/loop/ && $2 != "/" {print $1}' /proc/mounts`
[ -n "$remaining" ] && {
        sig=
        retry=3
        while [ -n "$remaining" -a "$retry" -gt 0 ]
        do
                if [ "$retry" -lt 3 ]; then
                        runcmd $"Unmounting loopback filesystems (retry):"
umount $remaining
                else
                        runcmd $"Unmounting loopback filesystems: " umount
$remaining
                fi
Comment 5 Miloslav Trmač 2006-05-25 11:07:20 EDT
This is fixed in rawhide.  Thanks for your report.

*** This bug has been marked as a duplicate of 186713 ***

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