This was my workaround for the problem. I made lightdm wait until we have network.
Here are the skripts:
/etc/init/networkdelay.conf :
description "wait for IP to be there"
#emits networkdelay
start on (net-device-up IFACE!=lo
and local-filesystems)
#start on (((starting lightdm or starting kdm) or starting xdm) or starting lxdm)
start on (starting lightdm
or starting kdm
or starting xdm
or starting lxdm)
This was my workaround for the problem. I made lightdm wait until we have network.
Here are the skripts:
/etc/init/ networkdelay. conf :
description "wait for IP to be there"
#emits networkdelay
start on (net-device-up IFACE!=lo
and local-filesystems)
#start on (((starting lightdm or starting kdm) or starting xdm) or starting lxdm)
start on (starting lightdm
or starting kdm
or starting xdm
or starting lxdm)
task
script network- ok
exec /usr/sbin/
end script
/usr/sbin/ network- ok:
#!/bin/sh network- diag
LOG=/tmp/
rm $LOG
#LOG=/dev/null
#touch $LOG
MAXWAIT=60
T0=`cut -f1 -d. /proc/uptime`
while (( test $(($T0+$MAXWAIT)) -gt $(cut -f1 -d. /proc/uptime) ))
do
date >> $LOG
pidof lightdm >> $LOG
#GW=`ip ro list default |head -1 |cut -d " " -f 3`
GW=`ip -4 ro list 0.0.0.0/0 | cut -d " " -f 3`
# ethtool eth0 >> $LOG
test -n "$GW" && ping -c1 -w1 $GW >> $LOG 2>&1 && break
sleep 1
done