[FFE] autofs5-ldap doesn't work immediately after bootup
Bug #533029 reported by
Andrew Pollock
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs5 (Ubuntu) |
Fix Released
|
High
|
Chuck Short | ||
Lucid |
Fix Released
|
High
|
Chuck Short |
Bug Description
Binary package hint: autofs5
If you log into a system that using automounted home directories and autofs5-ldap, you don't get your home directory mounted. If you wait a little while, or reload autofs, the home directory becomes automountable.
I think the problem is that autofs is starting via the legacy init scripts before the network is started by Upstart.
Related branches
Changed in autofs5 (Ubuntu Lucid): | |
assignee: | nobody → Chuck Short (zulcss) |
To post a comment you must log in.
This is the upstart job that I've hacked together, but either it's incorrect, or Upstart is misbehaving, because it's not working terribly well.
description "automounter"
author "Andrew Pollock <email address hidden>"
start on (net-device-up IFACE!=lo)
stop on runlevel [!2345]
expect daemon
respawn
pre-start script
. /etc/default/autofs
# Make sure the (right) kernel module is loaded
if ! grep -q autofs /proc/filesystems; then
if !modprobe autofs4 >/dev/null 2>&1; then
echo "Error: failed to load autofs4 module"
exit 1
fi
elif [ -f /proc/modules ] && grep -q ^autofs[^4] /proc/modules; then
# wrong autofs filesystem module loaded
echo
echo "Error: autofs kernel module is loaded, autofs4 required"
exit 1
fi
# Check misc device
if [ -n "$USE_MISC_DEVICE" -a "$USE_MISC_DEVICE" = "yes" ]; then
sleep 1
if [ -e "/proc/misc" ]; then
MINOR=$(awk '/autofs/ { print $1 }' /proc/misc)
if [ -n "$MINOR" -a ! -c "/dev/autofs" ]; then
mknod -m 0600 /dev/autofs c 10 $MINOR
fi
fi
if [ -x /sbin/restorecon -a -c /dev/autofs ]; then
/sbin/restorecon /dev/autofs
fi
else
if [ -c /dev/autofs ]; then
rm /dev/autofs
fi
fi
end script
exec /usr/sbin/automount