Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having an issue with the order in which services start up in Ubuntu 10.04. My workstations are configured to use winbind to connect to my Domain Controller for authentication.

The problem is that the gdm login screen will appear before the network interfaces have come up. This causes a problem, as clients cannot log in since the computer can't yet talk to the domain server.

Is there a way to delay the startup order of gdm such that it only appears after the network interfaces have been configured?

Ubuntu is now using upstart, and unfortunately, there is no GUI to configure it and the documentation is terrible. I really don't know where to start with it.

share|improve this question
    
For documentation you can do worse than look at man init and man 5 init - the latter documents the /etc/init/*.conf file format. It may not give you the big picture of course ... –  Hamish Downer Aug 24 '10 at 21:54
add comment

1 Answer

up vote 4 down vote accepted

In /etc/init/gdm.conf add the line

and net-device-up IFACE=eth0

to the start on statement (replace eth0 with the interface you need). It should look like

start on (filesystem
          and net-device-up IFACE=eth0
          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))
share|improve this answer
    
Thanks. This is very helpful. One question though: where are the upstart "modules" defined? For example, where is net-device-up, or filesystem defined? I would also like to alter my script to wait for winbind to connect to the domain controller. –  Phanto Aug 24 '10 at 17:51
    
Events can be emitted in .conf files using the "emits" statement (like the "filesystem" event in mountall.conf) or by external programs using DBus (net-device-up is AFAIK emitted by upstart-udev-bridge; you can use initctl to emit events from the command line). –  Florian Diesch Aug 24 '10 at 19:36
add comment

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.