Package: autofs; Maintainer for autofs is Mike Gabriel <sunweaver@debian.org>; Source for autofs is src:autofs (PTS, buildd, popcon).
Reported by: ieure@sickfuck.org
Date: Tue, 19 Mar 2002 07:18:01 UTC
Severity: important
Found in version 3.9.99-4.0.0pre10-0
Done: Daniel Lutz <danlutz@debian.org>
Bug is archived. No further changes may be made.
View this report as an mbox folder, status mbox, maintainer mbox
Report forwarded to debian-bugs-dist@lists.debian.org, Adam Heath <doogie@debian.org>, autofs@packages.qa.debian.org:
Bug#139009; Package autofs.
(full text, mbox, link).
Acknowledgement sent to ieure@sickfuck.org:
New Bug report received and forwarded. Copy sent to Adam Heath <doogie@debian.org>, autofs@packages.qa.debian.org.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: autofs
Version: 3.9.99-4.0.0pre10-0
Severity: important
When I try to use /var/autofs/net on my machines with
kernel-image-2.2.20-udma-ext3, I get this error:
-- snip --
ieure!proton:~$ cd /var/autofs/net/hadron/usr/local/tmp
bash: cd: /var/autofs/net/hadron/usr/local/tmp: No such file or directory
ieure!proton:~$
-- snip --
/var/log/daemon.log shows this: (extremely overly verbose output from
the above command)
-- snip --
Mar 18 23:05:25 proton automount[17902]: attempting to mount entry /var/autofs/net/hadron
Mar 18 23:05:25 proton automount[17907]: lookup(program): looking up hadron
Mar 18 23:05:25 proton automount[17907]: lookup(program): hadron -> -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17907]: parse(sun): expanded entry: -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17907]: parse(sun): dequote("fstype=nfs,hard,intr,nodev,nosuid") -> fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17907]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17907]: parse(sun): dequote("/usr/local/tmp") -> /usr/local/tmp
Mar 18 23:05:25 proton automount[17907]: parse(sun): dequote("hadron:/usr/local/tmp") -> hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17907]: parse(sun): multimount: hadron:/usr/local/tmp on /usr/local/tmp with options fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17907]: parse(sun): mounting root /var/autofs/net, mountpoint hadron/usr/local/tmp, what hadron:/usr/local/tmp, fstype nfs, options hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17907]: mount(nfs): root=/var/autofs/net name=hadron/usr/local/tmp what=hadron:/usr/local/tmp, fstype=nfs, options=hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17907]: mount(nfs): nfs options="hard,intr,nodev,nosuid", nosymlink=0
Mar 18 23:05:25 proton automount[17907]: mount(nfs): calling mkdir_path /var/autofs/net/hadron/usr/local/tmp
Mar 18 23:05:25 proton automount[17907]: mount(nfs): mkdir_path hadron/usr/local/tmp failed: Operation not permitted
Mar 18 23:05:25 proton automount[17902]: attempting to mount entry /var/autofs/net/hadron
Mar 18 23:05:25 proton automount[17912]: lookup(program): looking up hadron
Mar 18 23:05:25 proton automount[17912]: lookup(program): hadron -> -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17912]: parse(sun): expanded entry: -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17912]: parse(sun): dequote("fstype=nfs,hard,intr,nodev,nosuid") -> fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17912]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17912]: parse(sun): dequote("/usr/local/tmp") -> /usr/local/tmp
Mar 18 23:05:25 proton automount[17912]: parse(sun): dequote("hadron:/usr/local/tmp") -> hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17912]: parse(sun): multimount: hadron:/usr/local/tmp on /usr/local/tmp with options fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17912]: parse(sun): mounting root /var/autofs/net, mountpoint hadron/usr/local/tmp, what hadron:/usr/local/tmp, fstype nfs, options hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17912]: mount(nfs): root=/var/autofs/net name=hadron/usr/local/tmp what=hadron:/usr/local/tmp, fstype=nfs, options=hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17912]: mount(nfs): nfs options="hard,intr,nodev,nosuid", nosymlink=0
Mar 18 23:05:25 proton automount[17912]: mount(nfs): calling mkdir_path /var/autofs/net/hadron/usr/local/tmp
Mar 18 23:05:25 proton automount[17912]: mount(nfs): mkdir_path hadron/usr/local/tmp failed: Operation not permitted
Mar 18 23:05:25 proton automount[17902]: attempting to mount entry /var/autofs/net/hadron
Mar 18 23:05:25 proton automount[17917]: lookup(program): looking up hadron
Mar 18 23:05:25 proton automount[17917]: lookup(program): hadron -> -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17917]: parse(sun): expanded entry: -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17917]: parse(sun): dequote("fstype=nfs,hard,intr,nodev,nosuid") -> fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17917]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17917]: parse(sun): dequote("/usr/local/tmp") -> /usr/local/tmp
Mar 18 23:05:25 proton automount[17917]: parse(sun): dequote("hadron:/usr/local/tmp") -> hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17917]: parse(sun): multimount: hadron:/usr/local/tmp on /usr/local/tmp with options fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17917]: parse(sun): mounting root /var/autofs/net, mountpoint hadron/usr/local/tmp, what hadron:/usr/local/tmp, fstype nfs, options hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17917]: mount(nfs): root=/var/autofs/net name=hadron/usr/local/tmp what=hadron:/usr/local/tmp, fstype=nfs, options=hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17917]: mount(nfs): nfs options="hard,intr,nodev,nosuid", nosymlink=0
Mar 18 23:05:25 proton automount[17917]: mount(nfs): calling mkdir_path /var/autofs/net/hadron/usr/local/tmp
Mar 18 23:05:25 proton automount[17917]: mount(nfs): mkdir_path hadron/usr/local/tmp failed: Operation not permitted
Mar 18 23:05:25 proton automount[17902]: attempting to mount entry /var/autofs/net/hadron
Mar 18 23:05:25 proton automount[17922]: lookup(program): looking up hadron
Mar 18 23:05:25 proton automount[17922]: lookup(program): hadron -> -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17922]: parse(sun): expanded entry: -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17922]: parse(sun): dequote("fstype=nfs,hard,intr,nodev,nosuid") -> fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17922]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17922]: parse(sun): dequote("/usr/local/tmp") -> /usr/local/tmp
Mar 18 23:05:25 proton automount[17922]: parse(sun): dequote("hadron:/usr/local/tmp") -> hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17922]: parse(sun): multimount: hadron:/usr/local/tmp on /usr/local/tmp with options fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17922]: parse(sun): mounting root /var/autofs/net, mountpoint hadron/usr/local/tmp, what hadron:/usr/local/tmp, fstype nfs, options hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17922]: mount(nfs): root=/var/autofs/net name=hadron/usr/local/tmp what=hadron:/usr/local/tmp, fstype=nfs, options=hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17922]: mount(nfs): nfs options="hard,intr,nodev,nosuid", nosymlink=0
Mar 18 23:05:25 proton automount[17922]: mount(nfs): calling mkdir_path /var/autofs/net/hadron/usr/local/tmp
Mar 18 23:05:25 proton automount[17922]: mount(nfs): mkdir_path hadron/usr/local/tmp failed: Operation not permitted
Mar 18 23:05:25 proton automount[17902]: attempting to mount entry /var/autofs/net/hadron
Mar 18 23:05:25 proton automount[17927]: lookup(program): looking up hadron
Mar 18 23:05:25 proton automount[17927]: lookup(program): hadron -> -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17927]: parse(sun): expanded entry: -fstype=nfs,hard,intr,nodev,nosuid ^I/usr/local/tmp hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17927]: parse(sun): dequote("fstype=nfs,hard,intr,nodev,nosuid") -> fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17927]: parse(sun): gathered options: fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17927]: parse(sun): dequote("/usr/local/tmp") -> /usr/local/tmp
Mar 18 23:05:25 proton automount[17927]: parse(sun): dequote("hadron:/usr/local/tmp") -> hadron:/usr/local/tmp
Mar 18 23:05:25 proton automount[17927]: parse(sun): multimount: hadron:/usr/local/tmp on /usr/local/tmp with options fstype=nfs,hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17927]: parse(sun): mounting root /var/autofs/net, mountpoint hadron/usr/local/tmp, what hadron:/usr/local/tmp, fstype nfs, options hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17927]: mount(nfs): root=/var/autofs/net name=hadron/usr/local/tmp what=hadron:/usr/local/tmp, fstype=nfs, options=hard,intr,nodev,nosuid
Mar 18 23:05:25 proton automount[17927]: mount(nfs): nfs options="hard,intr,nodev,nosuid", nosymlink=0
Mar 18 23:05:25 proton automount[17927]: mount(nfs): calling mkdir_path /var/autofs/net/hadron/usr/local/tmp
Mar 18 23:05:25 proton automount[17927]: mount(nfs): mkdir_path hadron/usr/local/tmp failed: Operation not permitted
-- snip --
The same thing happens on my other system which runs
2.2.20-udma100-ext3. However, my desktop system, which runs a custom
2.4.18 kernel, works perfectly. All three systems are running woody,
current as of today - the only obvious difference I see is that the
2.4.18 box has CONFIG_AUTOFS4_FS set - 2.2.x only has autofs 3.x. This
is a pretty bad problem if it affects all 2.2.x kernels, as I suspect
it does.
Despite what bug claims, I have not modified any autofs configuration
files. I purged the package, then reinstalled to make sure it wasn't a
change I had made that was breaking it.
-- System Information
Debian Release: 3.0
Kernel Version: Linux electron 2.2.20-udma100-ext3 #1 SMP Tue Jan 1 18:13:46 CET 2002 i686 unknown
Versions of the packages autofs depends on:
ii libc6 2.2.5-3 GNU C Library: Shared libraries and Timezone
ii procps 2.0.7-8 The /proc file system utilities.
--- Begin /etc/auto.master (modified conffile)
/var/autofs/misc /etc/auto.misc
/var/autofs/net /etc/auto.net
--- End /etc/auto.master
--- Begin /etc/auto.misc (modified conffile)
kernel -ro ftp.kernel.org:/pub/linux
boot -fstype=ext2 :/dev/hda1
removable -fstype=ext2,sync,nodev,nosuid :/dev/hdd
cd -fstype=iso9660,ro,sync,nodev,nosuid :/dev/hdc
floppy -fstype=auto,sync,nodev,nosuid :/dev/fd0
--- End /etc/auto.misc
--- Begin /etc/init.d/autofs (modified conffile)
#! /bin/bash
FLAGS="defaults 21"
DAEMON=/usr/sbin/automount
initdir=/etc/init.d
system=unknown
if [ -f /etc/debian_version ]; then
system=debian
elif [ -f /etc/redhat-release ]; then
system=redhat
else
echo "$0: Unknown system, please port and contact autofs@linux.kernel.org" 1>&2
exit 1
fi
if [ $system = redhat ]; then
. $initdir/functions
fi
test -e $DAEMON || exit 0
thisscript="$0"
if [ ! -f "$thisscript" ]; then
echo "$0: Cannot find myself" 1>&2
exit 1
fi
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
localoptions=''
daemonoptions=''
function getmounts()
{
if ! getmounts_file /etc/auto.master; then
if ! getnismounts auto.master; then
echo "no autofs mounts configured!" 1>&2
fi
fi
}
function getmounts_file()
{
#
# Check for local maps to be loaded
#
local map="$1"
shift
if [ -f "$map" ]
then
cat "$map" | sed -e '/^#/d' -e '/^$/d' | process_master_file "$@"
else
return 1
fi
}
function process_master_file()
{
local line_options="$@" daemon_options
while read dir map options
do
options="$line_options $options"
case "$dir" in
+*) getnismounts "${dir/+/}" $map $options
continue;
esac
if [ ! -z "$dir" -a ! -z "$map" \
-a x`echo "$map" | cut -c1` != 'x-' ]
then
type=""
if [ -x $map ]; then
type=program
elif [ -f $map ]; then
type=file
elif [ x`echo "$map" | cut -c1` == 'x/' ]; then
# Starts with '/', thus a file, but doesn't exist
# so leave it out, leaving 'type=""' (hro)
type=""
elif [ -f /etc/$map ]; then
type=file
map=/etc/$map
elif [ $map == hesiod ]; then
type=hesiod
map=""
elif [ $map == ldap ]; then
type=ldap
map=""
else
case "$map" in
!*) type=program map="${map/!/}";;
*) type=yp;;
esac
fi
daemon_options=`munge_options daemon $daemonoptions $options`
options=`munge_options mount $options`
if [ "$type" ]; then
echo "$DAEMON $daemon_options -- $dir $type $map $localoptions $options"
fi
fi
done
}
function getnismounts()
{
#
# Check for YellowPage maps to be loaded
#
local map="$1"
shift
if [ -e /usr/bin/ypcat ] && [ `ypcat -k "$map" 2>/dev/null | wc -l` -gt 0 ]
then
ypcat -k "$map" | process_master_file "$@"
else
return 1
fi
}
function active()
{
ps ax|grep "[0-9]:[0-9][0-9] $DAEMON " |
while read pid tt stat time command
do
echo $command
done
}
function status()
{
echo "Configured Mount Points:"
echo "------------------------"
getmounts | sed 's/ -- / /'
echo ""
echo "Active Mount Points:"
echo "--------------------"
active
}
function munge_options()
{
local which="$1"
shift
echo "$@" | awk -v which="$which" '
BEGIN {
RS="[, \n-]"
FS="="
daemon_opts[ "timeout" ] = "timeout"
daemon_opts[ "t" ] = "timeout"
}
{
if ( $0 ~ /^$/ )
next
if ( $1 in daemon_opts ) {
daemon[ daemon_opts[ $1 ] ] = $2
} else {
mount[$0] = 1
}
}
END {
if ( which ~ "^daemon$" ) {
if ( "timeout" in daemon ) {
printf "--timeout=%s\n", daemon["timeout"]
}
} else {
for ( a in mount ) {
if ( length( out ) )
out=out "," a
else
out=a
}
printf "%s\n", out
}
}
'
}
function alive()
{
if [ -z "$*" ]; then
return 1
fi
for i in $*; do
if kill -0 $i 2> /dev/null; then
return 0
fi
done
return 1
}
function redhat()
{
case "$1" in
start)
# Check if the automounter is already running?
if [ ! -f /var/lock/subsys/autofs ]; then
echo 'Starting automounter: '
getmounts | sed 's/ -- / /' | sh
touch /var/lock/subsys/autofs
fi
;;
stop)
pids=$(/sbin/pidof $DAEMON)
kill -TERM $pids 2> /dev/null && sleep 1
count=1
while alive $pids; do
sleep 5
count=$(expr $count + 1)
if [ $count -gt 5 ]; then
echo "Giving up on automounter"
break;
fi
echo "Automounter not stopped yet: retrying... (attempt $count)"
done
if [ $count -gt 1 -a $count -le 5 ]; then
echo "Automounter stopped"
fi
rm -f /var/lock/subsys/autofs
;;
reload|restart)
if [ ! -f /var/lock/subsys/autofs ]; then
echo "Automounter not running"
exit 1
fi
echo "Checking for changes to /etc/auto.master ...."
TMP1=`mktemp /tmp/autofs.XXXXXX` || { echo "could not make temp file" >& 2; exit 1; }
TMP2=`mktemp /tmp/autofs.XXXXXX` || { echo "could not make temp file" >& 2; exit 1; }
getmounts | sed 's/ -- / /' >$TMP1
ps ax|grep "[0-9]:[0-9][0-9] $DAEMON " | (
while read pid tt stat time command; do
echo "$command" >>$TMP2
if ! grep -q "^$command" $TMP2; then
while kill -USR2 $pid; do
sleep 3
done
echo "Stop $command"
fi
done
)
( while read x; do
if ! grep -q "^$x" $TMP2; then
$x
echo "Start $x"
fi
done ) < $TMP1
rm -f $TMP1 $TMP2
;;
status)
status
;;
getmounts)
getmounts
;;
active)
active
;;
*)
echo "Usage: $initdir/autofs {start|stop|restart|reload|status|getmounts|active}"
exit 1
esac
}
function debian()
{
case "$1" in
start)
echo -n 'Starting automounter: '
getmounts | while read cmd args
do
opt=${args%%-- *}
rest=${args#*-- }
mnt=${rest%% *}
rest=${rest#* }
echo -n " $mnt"
if [ ! -d /var/run/autofs ]; then
mkdir /var/run/autofs
fi
pidfile=/var/run/autofs/`echo $mnt | sed 's,_,__,g;s,/,_:,g'`.pid
start-stop-daemon --start --pidfile $pidfile --quiet \
--exec $DAEMON -- $opt $mnt $rest
done
echo "done."
;;
stop)
echo -n 'Stopping automounter: '
start-stop-daemon --stop --quiet --signal USR2 --exec $DAEMON
for file in /var/run/autofs/*.pid
do
if [ -e "$file" ]
then
pid=`head -n 1 $file`
command=`tail -n 1 $file`
if [ -z "`ps --no-heading $pid`" ]
then
echo -n "Stopped $pid($command) "
rm -f $file
else
echo -n "Couldn't stop $pid($command) "
fi
fi
done
echo "done."
;;
reload)
echo -n "Reloading automounter: checking for changes ... "
TMP=/var/run/autofs.tmp
getmounts | sed 's/ -- / /' >$TMP
for i in /var/run/autofs/*.pid
do
pid=`head -n 1 $i 2>/dev/null`
[ "$pid" = "" ] && continue
command=`tail +2 $i`
if ! grep -q "^$command" $TMP
then
echo -n "Stopping automounter: $command"
kill -USR2 $pid
rm -f $i
fi
done
echo "done."
rm -f $TMP
$thisscript start
;;
force-reload|restart)
$0 stop
$0 start
;;
status)
status
;;
getmounts)
getmounts | sed 's/ -- / /'
;;
active)
active
;;
*)
echo "Usage: $initdir/autofs {start|stop|restart|reload|force-reload|status|getmounts|active}" >&2
exit 1
;;
esac
}
if [ $system = debian ]; then
debian "$@"
elif [ $system = redhat ]; then
redhat "$@"
fi
exit 0
--- End /etc/init.d/autofs
Bug closed, send any further explanations to ieure@sickfuck.org
Request was from Daniel Lutz <danlutz@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Send a report that this bug log contains spam.
Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.