2

I have a machine (with mythtv installed) which automatically login a user, whose home directory is located on a server accessed by NFS4. In about 6 of 10 times it works like a charm, but sometimes the login stops because the home directory is not yet accessible. The home directory mount is mananged by autofs (using LDAP) and NFS4 on client and server (running Ubuntu 10.04). Any ideas, how to configure 'wait until home is ready' for my auto-login?

4

On Ubuntu 10.04, both autofs and GDM are Upstart (/etc/init) jobs, which means that they can potentially run in parallel.

However, since neither has an explicit dependency on the other, there is nothing enforcing that GDM starts after autofs, so there is a race condition between the two.

The best way to solve this is to reconfigure GDM to only start once autofs has started. To do this, edit /etc/init/gdm.conf, and change the start on block. Where it originally reads,

start on (filesystem
          and started dbus
          and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
               or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
               or stopped udevtrigger))

add an additional clause so that it reads

start on (filesystem
          and started dbus
          and (graphics-device-added fb0 PRIMARY_DEVICE_FOR_DISPLAY=1
               or drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
               or stopped udevtrigger)
          and started autofs)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.