Bug#737728: ifupdown: Reopen 678101: shell scripting mistake in /etc/init.d/networking

2014-02-06 Thread Herman Tolken - Hetzner (Pty) Ltd

Hi Andrew,

here is the ouput for the command as you requested:

# ifup eth0:2 -v
Configuring interface eth0:2=eth0:2 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
ip addr add XX.XXX.XX.XXX/255.255.255.0 broadcast XX.XXX.XX.XXX 
  dev eth0:2 label eth0:2

ip link set dev eth0:2   up

run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/clamav-freshclam-ifupdown
run-parts: executing /etc/network/if-up.d/ethernet-link
cat: /sys/class/net/eth0:2/operstate: No such file or directory
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/ntpdate
run-parts: executing /etc/network/if-up.d/openssh-server
run-parts: executing /etc/network/if-up.d/upstart

It looks like the problem comes at how the $STATE variable is set via 
the /usr/local/bin/enforce-ethernet-link on line 18:

  STATE=$(cat /sys/class/net/$I/operstate)

Manualy setting this variable resolves the output issue.

Thank you for assisting

On 05/02/2014 23:52, Andrew Shadura wrote:

Hello,

On Wed, 05 Feb 2014 15:00:19 +0200
Herman Tolken - Hetzner (Pty) Ltd herman.tol...@hetzner.co.za wrote:


When using ifup to bring interface eth0:2 up I get the following
output:

#: ifup eth0:2
cat: /sys/class/net/eth0:2/operstate: No such file or directory

Could you please run it with -v? I don't remember having checks like
that in ifupdown itself (there's one in the init script, however).



--
Herman Tolken
Systems Administrator

Hetzner (Pty) Ltd
National Contact Centre:  0861-0861-08
Fax:  0861-0861-09
International: +27 21 970 2000
Web: http://www.hetzner.co.za
Disclaimer: http://www.hetzner.co.za/email-disclaimer

Hetzner (Pty) Ltd  -  Winning awards since 2003


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#737728: ifupdown: Reopen 678101: shell scripting mistake in /etc/init.d/networking

2014-02-05 Thread Herman Tolken - Hetzner (Pty) Ltd

Package: ifupdown
Version: 0.7.8
Severity: normal
Debian Version: 7.3 Wheezy
Kernel: 3.2.0-4-686-pae #1 SMP Debian 3.2.51-1 i686 GNU/Linux

When using ifup to bring interface eth0:2 up I get the following output:

#: ifup eth0:2
cat: /sys/class/net/eth0:2/operstate: No such file or directory

/sys/class/net# ls -alh
total 0
drwxr-xr-x  2 root root 0 Jan 31 10:15 .
drwxr-xr-x 35 root root 0 Jan 31 10:15 ..
lrwxrwxrwx  1 root root 0 Jan 31 10:15 eth0 - 
../../devices/pci:00/:00:1c.4/:02:00.0/net/eth0
lrwxrwxrwx  1 root root 0 Jan 31 10:15 eth1 - 
../../devices/pci:00/:00:19.0/net/eth1

lrwxrwxrwx  1 root root 0 Jan 31 10:15 lo - ../../devices/virtual/net/lo

The interface still comes online despite the unwanted output.

This same behaviour was reported in bug 67010 (I have not check if this 
also happens on boot, I would presume so), and was closed due the issue 
being resolved in ifupdown version 0.7.1. I have check that I have the 
patched version of the /etc/init.d/networking file, and it appears so:


/etc/init.d/networking
103:if [ -e /sys/class/net/$link ] 
 [ $(cat /sys/class/net/$link/operstate) = up ]


This occurs on all of our servers that I have tested on, they are all 
the exact same build software wise.


--
Herman Tolken
Systems Administrator

Hetzner (Pty) Ltd
National Contact Centre:  0861-0861-08
Fax:  0861-0861-09
International: +27 21 970 2000
Web: http://www.hetzner.co.za
Disclaimer: http://www.hetzner.co.za/email-disclaimer

Hetzner (Pty) Ltd  -  Winning awards since 2003


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org