After sending off the bug report, I started looking in /sys and found
/sys/class/net/INTERFACE/flags.

cat /sys/class/net/sixxs/flags on the working box yielded 0x91 and on
the broken box 0x90; so I did cat 0x91 >/sys/class/net/sixxs/flags and
after that was able to manually do the rest of the commands ifup runs.

So, replacing:

    /sbin/ip link set sixxs up

with

   cat 0x91 >/sys/class/net/sixxs/flags

allows the script to complete.

(Obviously the proper way to do that is to read the flags file, convert
the ascii to an int, OR with 0x01, and then fprintf(3) that as "0x%x"
to the flags file.  Something along the lines of:

,----
| #!/bin/bash
| # arg1 has the link name
| read h </sys/class/net/$1/flags
| printf '0x%x\n' $[ $h | 1 ] >/sys/class/net/$1/flags
`----

does the right thing.)

Why that works where using RTNETLINK as ip(8) does I do not know.

-JimC
-- 
James Cloos <[EMAIL PROTECTED]>         OpenPGP: 1024D/ED7DAEA6



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to