Bug 17288 - halt script tries to umount autofs mount points!
halt script tries to umount autofs mount points!
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Depends On:
  Show dependency treegraph
Reported: 2000-09-06 12:30 EDT by Mathieu Chouquet-Stringer
Modified: 2014-03-16 22:16 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-09-06 15:21:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mathieu Chouquet-Stringer 2000-09-06 12:30:46 EDT
If you use autofs with Pinstripe, it works very well. But there is one 
problem with halt scripts (located in the initscripts rpm): it tries to 
unount the autofs mount points! It is normal to unmount all the 
filesystems autofs has mounted, but autofs mount points can't be unmount, 
it is impossible.

For example, if I have autofs running in /mnt/cds/auto with 2 possibles 
mountpoints in this directory (cdrom and cdwriter), the halt script will 
unmount cdrom and cdwriter (which is right) but /mnt/cds/auto too, which 
is wrong.

The solution is located in the patch below (added autofs to the remaining 

--- halt.orig	Wed Aug 30 21:34:09 2000
+++ halt	Mon Sep  4 00:18:24 2000
@@ -67,7 +67,7 @@
 # Unmount file systems, killing processes if we have to.
-remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print 
$2}' /proc/mounts`
+remaining=`awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ {print 
$2}' /proc/mounts`
 while [ -n "$remaining" -a "$retry" -gt 0 ]
 	if [ "$retry" -lt 3 ]; then
@@ -76,7 +76,7 @@
 		runcmd "Unmounting file systems"  umount -a -f -t noproc
 	sleep 2
-	remaining=`awk '!/(^#|proc|loopfs|^none|^\/dev\/root| \/ )/ {print 
$2}' /proc/mounts`
+	remaining=`awk '!/(^#|proc|loopfs|autofs|^none|^\/dev\/root| \/ )/ 
{print $2}' /proc/mounts`
 	[ -z "$remaining" ] && break
 	/sbin/fuser -k -m $sig $remaining >/dev/null
 	sleep 5
Comment 1 Bill Nottingham 2000-09-06 13:34:38 EDT
This shouldn't be happening anyways, AFAICT. This implies that
you didn't shut down autofs cleanly.
Comment 2 Mathieu Chouquet-Stringer 2000-09-06 15:21:38 EDT
Yes, you're right! Autofs didn't shutdown cleanly. It said that the mountpoints 
are used. 
It is perfectly normal: no process were killed (before this script is called) 
so it is possible that when autofs shutdowns, processes are still using the 
mountpoints... Hence the uncleanly shutdown and the unmount failure during the 
halt script...
Comment 3 Bill Nottingham 2001-01-29 19:31:41 EST
will be added as of 5.60-1 ; thanks!

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