Bug 189695 - /etc/init.d/halt has problems with mountpoints containing spaces
Summary: /etc/init.d/halt has problems with mountpoints containing spaces
Keywords:
Status: CLOSED DUPLICATE of bug 186713
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 5
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: 2006-04-23 10:33 UTC by Vladimir Kotal
Modified: 2014-03-17 02:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-25 15:07:20 UTC
Type: ---
Embargoed:


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

Description Vladimir Kotal 2006-04-23 10:33:05 UTC
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 10:33:05 UTC
Created attachment 128127 [details]
screenshot of /etc/init.d/halt failing

Comment 2 Vladimir Kotal 2006-04-23 10:35:31 UTC
Created attachment 128128 [details]
another screenshot showing actual end of halt procedure

Comment 3 Vladimir Kotal 2006-04-23 10:36:56 UTC
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 10:39:40 UTC
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 15:07:20 UTC
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.