Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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)
share|improve this answer
    
i will try this. thanks –  Andreas Roth Jul 5 '10 at 12:13
    
works great. thx –  Andreas Roth Jul 6 '10 at 5:10
    
Here is another solution that seems to work without autofs softsolder.com/2012/05/07/ubuntu-12-04-nfs-mounts-vs-upstart –  Peter Lamberg Jul 15 '13 at 5:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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