Package: autofs5
Version: 5.0.4-3.2+b1
Severity: normal

The autofs init script defines shell functions with the `function' keyword.
The `function' keyword is not in the POSIX.2 standard, and causes dash to
fail.  As bash will work without, I just deleted the keywords (see 
attached changed version)

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages autofs5 depends on:
ii  libc6                        2.13-2      Embedded GNU C Library: Shared lib
ii  ucf                          3.0025+nmu2 Update Configuration File: preserv

Versions of packages autofs5 recommends:
ii  module-init-tools             3.12-1     tools for managing Linux kernel mo
ii  nfs-common                    1:1.2.3-2  NFS support files common to client

autofs5 suggests no packages.

-- Configuration Files:
/etc/init.d/autofs changed:
DAEMON=/usr/sbin/automount
prog=`basename $DAEMON`
MODULE="autofs4"
DEVICE="autofs"
confdir=/etc/default
test -e $DAEMON || exit 0
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
if [ -r $confdir/autofs ]; then
        . $confdir/autofs
fi
start() {
        echo -n "Starting $prog: "
        # Make sure autofs4 module is loaded
        if ! grep -q autofs /proc/filesystems
        then
                # Try load the autofs4 module fail if we can't
                modprobe $MODULE >/dev/null 2>&1
                if [ $? -eq 1 ]
                then
                        echo "Error: failed to load autofs4 module."
                        return 1
                fi
        elif ([ -f /proc/modules ] && lsmod) | grep -q autofs[^4]
        then
                # wrong autofs filesystem module loaded
                echo
                echo "Error: autofs kernel module is loaded, autofs4 required"
                return 1
        fi
        # Check misc device
        if [ -n "$USE_MISC_DEVICE" -a "x$USE_MISC_DEVICE" = "xyes" ]; then
                sleep 1
                if [ -e "/proc/misc" ]; then
                        MINOR=`awk "/$DEVICE/ {print \\$1}" /proc/misc`
                        if [ -n "$MINOR" -a ! -c "/dev/$DEVICE" ]; then
                                mknod -m 0600 /dev/$DEVICE c 10 $MINOR
                        fi
                fi
                if [ -x /sbin/restorecon -a -c /dev/$DEVICE ]; then
                        /sbin/restorecon /dev/$DEVICE
                fi
        else
                if [ -c /dev/$DEVICE ]; then
                        rm /dev/$DEVICE
                fi
        fi
        start-stop-daemon --start --exec $DAEMON --oknodo -- $OPTIONS 
        RETVAL=$?
        if [ $RETVAL -eq 0 ] ; then
                echo "done."
        else
                echo "no valid automount entries defined."
        fi
        return 0
}
stop() {
        echo -n $"Stopping $prog: "
        count=0
        while [ -n "`pidof $DAEMON`" -a $count -lt 15 ] ; do
                start-stop-daemon --stop --exec $DAEMON --oknodo
                [ -z "`pidof $DAEMON`" ] || sleep 3
                count=`expr $count + 1`
        done
        if [ -z "`pidof $DAEMON`" ] ; then
                RETVAL=0
                echo "done."
        else
                RETVAL=1
                echo "failed."
        fi
        return $RETVAL
}
restart() {
        stop
        start
}
reload() {
        pid=`pidof $DAEMON`
        if [ -z $pid ]; then
                echo $"$prog not running"
                RETVAL=1
        else
                kill -HUP $pid 2> /dev/null
                echo $"Reloading maps"
                RETVAL=0
        fi
        return $RETVAL
}
RETVAL=0
case "$1" in
        start)
                start
                ;;
        forcestart)
                OPTIONS="$OPTIONS --force"
                start
                ;;
        stop)
                stop
                ;;
        restart|force-reload)
                restart
                ;;
        forcerestart)
                OPTIONS="$OPTIONS --force"
                restart
                ;;
        reload)
                reload
                ;;
        *)
                echo $"Usage: $0 
{start|forcestart|stop|restart|forcerestart|reload|force-reload}"
                exit 1;
                ;;
esac
exit $?


-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to