How to set up static IP in 12.04 and avoid these start-up delays?
Chris Green
cl at isbd.net
Thu Oct 4 13:06:14 UTC 2012
On Thu, Oct 04, 2012 at 01:59:24PM +0100, Chris Green wrote:
> On Thu, Oct 04, 2012 at 08:08:43AM -0400, Tom H wrote:
> > > To debug the situation you could create /etc/network/if-up.d/0000debug with
> > >
> > > exec >> /var/log/ifup-d.log 2>&1
> > > echo "Running if-up.d scripts for $IFACE"
> > > set -x
> > >
> > > and then look at that log file when the server boots.
> >
> > I'd put that snippet (more or less) into every script in
> > "/etc/network/if-up.d/" because I don't think that 0000debug'll act on
> > the other scripts - and it should be "chmod -x"'d.
> >
> You're quite right, the 0000debug didn't do any good so I have added the
> above (with the name of the script changed) to each script in if-up.d.
>
> ... listen to this space! :-)
>
Here's the result (attached, it's a bit long), I can't see anything wrong.
--
Chris Green
-------------- next part --------------
wpasupplicant for eth0
+ [ -n ]
+ [ eth0 = lo ]
+ [ -n ]
+ WPA_IFACE=eth0
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant.eth0.pid
+ WPA_SUP_OMIT_DIR=/run/sendsigs.omit.d
+ WPA_SUP_OMIT_PIDFILE=/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth0.pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action.eth0.pid
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action.eth0.timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action.eth0.ifupdown
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ 0 = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ do_stop
+ test_wpa_cli
+ test_daemon_pidfile /sbin/wpa_cli /var/run/wpa_action.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_cli ]
+ DAEMON=/sbin/wpa_cli
+ [ -f /var/run/wpa_action.eth0.pid ]
+ [ -n /sbin/wpa_cli ]
+ [ -f ]
+ return 1
+ test_wpa_supplicant
+ test_daemon_pidfile /sbin/wpa_supplicant /var/run/wpa_supplicant.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_supplicant ]
+ DAEMON=/sbin/wpa_supplicant
+ [ -f /var/run/wpa_supplicant.eth0.pid ]
+ [ -n /sbin/wpa_supplicant ]
+ [ -f ]
+ return 1
+ exit 0
avahi-deamon for eth0
+ [ eth0 != lo ]
+ [ -x /usr/lib/avahi/avahi-daemon-check-dns.sh ]
+ exec /usr/lib/avahi/avahi-daemon-check-dns.sh
wpasupplicant for eth0
+ [ -n ]
+ [ eth0 = lo ]
+ [ -n ]
+ WPA_IFACE=eth0
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant.eth0.pid
+ WPA_SUP_OMIT_DIR=/run/sendsigs.omit.d
+ WPA_SUP_OMIT_PIDFILE=/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth0.pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action.eth0.pid
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action.eth0.timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action.eth0.ifupdown
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ 0 = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ do_stop
+ test_wpa_cli
+ test_daemon_pidfile /sbin/wpa_cli /var/run/wpa_action.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_cli ]
+ DAEMON=/sbin/wpa_cli
+ [ -f /var/run/wpa_action.eth0.pid ]
+ [ -n /sbin/wpa_cli ]
+ [ -f ]
+ return 1
+ test_wpa_supplicant
+ test_daemon_pidfile /sbin/wpa_supplicant /var/run/wpa_supplicant.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_supplicant ]
+ DAEMON=/sbin/wpa_supplicant
+ [ -f /var/run/wpa_supplicant.eth0.pid ]
+ [ -n /sbin/wpa_supplicant ]
+ [ -f ]
+ return 1
+ exit 0
wpasupplicant for eth0
+ [ -n ]
+ [ eth0 = lo ]
+ [ -n ]
+ WPA_IFACE=eth0
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant.eth0.pid
+ WPA_SUP_OMIT_DIR=/run/sendsigs.omit.d
+ WPA_SUP_OMIT_PIDFILE=/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth0.pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action.eth0.pid
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action.eth0.timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action.eth0.ifupdown
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ 0 = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ do_start
+ test_wpa_cli
+ test_daemon_pidfile /sbin/wpa_cli /var/run/wpa_action.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_cli ]
+ DAEMON=/sbin/wpa_cli
+ [ -f /var/run/wpa_action.eth0.pid ]
+ [ -n /sbin/wpa_cli ]
+ [ -f ]
+ return 1
+ grep -q ^IF_WPA
+ set
+ exit 0
avahi-deamon for eth0
+ [ eth0 != lo ]
+ [ -x /usr/lib/avahi/avahi-daemon-check-dns.sh ]
+ exec /usr/lib/avahi/avahi-daemon-check-dns.sh
wpasupplicant for lo
+ [ -n ]
+ [ lo = lo ]
+ exit 0
avahi-deamon for lo
+ [ lo != lo ]
+ exit 0
ntpdate for lo
+ set -e
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ [ loopback = static ]
+ [ loopback = loopback ]
+ exit 0
openssh-server for lo
+ set -e
+ [ lo = lo ]
+ exit 0
postfix for lo
+ [ lo = lo ]
+ exit 0
upstart for lo
+ set -e
+ [ lo != lo ]
+ :
+ all_interfaces_up /run/network/ifup.
+ local prefix=/run/network/ifup. iface=
+ get_auto_interfaces
+ local found=
+ ifquery --list --allow auto
+ found=lo
eth0
eth1
+ set -- lo eth0 eth1
+ echo lo eth0 eth1
+ [ -f /run/network/ifup.lo ]
+ [ -f /run/network/ifup.eth0 ]
+ return 1
wpasupplicant for lo
+ [ -n ]
+ [ lo = lo ]
+ exit 0
wpasupplicant for eth1
+ [ -n ]
+ [ eth1 = lo ]
+ [ -n ]
+ WPA_IFACE=eth1
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant.eth1.pid
+ WPA_SUP_OMIT_DIR=/run/sendsigs.omit.d
+ WPA_SUP_OMIT_PIDFILE=/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth1.pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action.eth1.pid
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action.eth1.timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action.eth1.ifupdown
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ 0 = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ do_start
+ test_wpa_cli
+ test_daemon_pidfile /sbin/wpa_cli /var/run/wpa_action.eth1.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_cli ]
+ DAEMON=/sbin/wpa_cli
+ [ -f /var/run/wpa_action.eth1.pid ]
+ [ -n /sbin/wpa_cli ]
+ [ -f ]
+ return 1
+ set
+ grep -q ^IF_WPA
+ exit 0
ntpdate for eth0
+ set -e
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin
+ [ static = static ]
+ OPTS=-b
+ [ static = loopback ]
+ [ ! -x /usr/sbin/ntpdate-debian ]
+ [ -d /usr/sbin ]
+ exit 0
openssh-server for eth0
+ set -e
+ [ eth0 = lo ]
+ [ start != start ]
+ [ inet != inet ]
+ [ ! -e /usr/sbin/sshd ]
+ [ ! -f /var/run/sshd.pid ]
+ cat /var/run/sshd.pid
+ ps -p 465 -o comm=
+ [ sshd != sshd ]
+ stop ssh
ssh stop/waiting
+ start ssh
ssh start/running, process 869
+ exit 0
postfix for eth0
+ [ eth0 = lo ]
+ [ ! -d /usr/lib/postfix ]
+ RUNNING=
+ [ -f /var/spool/postfix/pid/master.pid ]
+ sed s/ //g /var/spool/postfix/pid/master.pid
+ pid=1227
+ ls -l /proc/1227/exe
+ sed s/.* //;s/.*\///
+ exe=
+ [ X = Xmaster ]
+ [ ! -x /sbin/resolvconf ]
+ f=/etc/resolv.conf
+ postconf -h queue_directory
+ cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
+ [ -n ]
+ [ -n ]
upstart for eth0
+ set -e
+ [ eth0 != lo ]
+ initctl emit -n net-device-up IFACE=eth0 LOGICAL=eth0 ADDRFAM=inet METHOD=static
+ :
+ all_interfaces_up /run/network/ifup.
+ local prefix=/run/network/ifup. iface=
+ get_auto_interfaces
+ local found=
+ ifquery --list --allow auto
+ found=lo
eth0
eth1
+ set -- lo eth0 eth1
+ echo lo eth0 eth1
+ [ -f /run/network/ifup.lo ]
+ [ -f /run/network/ifup.eth0 ]
+ [ -f /run/network/ifup.eth1 ]
+ return 1
wpasupplicant for eth0
+ [ -n ]
+ [ eth0 = lo ]
+ [ -n ]
+ WPA_IFACE=eth0
+ [ -f /etc/wpa_supplicant/functions.sh ]
+ . /etc/wpa_supplicant/functions.sh
+ WPA_SUP_BIN=/sbin/wpa_supplicant
+ WPA_SUP_PNAME=wpa_supplicant
+ WPA_SUP_PIDFILE=/var/run/wpa_supplicant.eth0.pid
+ WPA_SUP_OMIT_DIR=/run/sendsigs.omit.d
+ WPA_SUP_OMIT_PIDFILE=/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.eth0.pid
+ WPA_CLI_BIN=/sbin/wpa_cli
+ WPA_CLI_PNAME=wpa_cli
+ WPA_CLI_PIDFILE=/var/run/wpa_action.eth0.pid
+ WPA_CLI_TIMESTAMP=/var/run/wpa_action.eth0.timestamp
+ WPA_CLI_IFUPDOWN=/var/run/wpa_action.eth0.ifupdown
+ [ -z ]
+ WPA_CTRL_DIR=/var/run/wpa_supplicant
+ [ -n ]
+ [ 0 = 1 ]
+ TO_NULL=/dev/null
+ DAEMON_VERBOSITY=--quiet
+ [ ! -x /sbin/wpa_supplicant ]
+ [ ! -x /sbin/wpa_cli ]
+ do_start
+ test_wpa_cli
+ test_daemon_pidfile /sbin/wpa_cli /var/run/wpa_action.eth0.pid
+ local DAEMON
+ local PIDFILE
+ [ -n /sbin/wpa_cli ]
+ DAEMON=/sbin/wpa_cli
+ [ -f /var/run/wpa_action.eth0.pid ]
+ [ -n /sbin/wpa_cli ]
+ [ -f ]
+ return 1
+ grep -q ^IF_WPA
+ set
+ exit 0
More information about the ubuntu-users
mailing list