Well, fact is, that the autofs daemon is started right before network
manager is bringing (wired) interfaces up:
Jul 8 12:39:07 myclient automount[1431]: Starting automounter version 5.0.6,
master map ou=auto.master,ou=[...],dc=example,dc=org
Jul 8 12:39:07 myclient automount[1431]: using kernel protocol version 5.02
Jul 8 12:39:07 myclient automount[1431]: lookup(file): file map
/etc/ou=auto.master,ou=[...],dc=example,dc=org missing or not readable
Jul 8 12:39:07 myclient automount[1431]: no mounts in table
[...]
Jul 8 12:39:09 myclient NetworkManager[1100]: Auto-activating
connection 'Kabelnetzwerkverbindung 1'.
[...]
Jul 8 12:39:10 myclient NetworkManager[1100]: Activation (eth0)
successful, device activated.
An elegant workaround would be to use a NetworkManager dispatcher script.
Create a new empty file and make it executable:
touch /etc/NetworkManager/dispatcher.d/80automount
chmod 755 /etc/NetworkManager/dispatcher.d/80automount
Now you can open this file and paste your script which, in its simplest
form, restarts the autofs daemon:
#!/bin/bash
# These arguments are handed over by NetworkManager
INTERFACE=$1
ACTION=$2
case "$2" in
up)
# Restart the automount daemon
/etc/init.d/autofs restart
;;
down)
;;
pre-up)
;;
post-down)
;;
*)
echo $"Usage: $0 {up|down|pre-up|post-down}"
exit 1
esac
Save, exit and restart. Automount should be working now.
What it does: As soon as a new network connection is brought up successfully,
the autofs daemon is restarted. Since at this point the connection is up
already, it is now able to get the correct LDAP automount maps from the LDAP
server.
This script can be improved of course, but you get the idea.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to autofs5 in Ubuntu.
https://bugs.launchpad.net/bugs/994212
Title:
ldap fails to start when /etc/network/interfaces not used
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autofs5/+bug/994212/+subscriptions
--
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs