Hi Joey On Dec 12, 2007 1:26 PM, Joey Hess <[EMAIL PROTECTED]> wrote:
> iface=$(ip route | grep '^default' | cut -d ' ' -f 5) > if ls -l /sys/class/net/$iface/device | grep -q ixp4xx_mac; then > echo "firmware in use" > else > echo "firmware not in use" > fi > > Does this work on your slugs with and without the firmware? I have > an unreleased nslu2-utils in svn that adds this test. It does work (I updated the script above to use the commands in svn revision 130). On a slug with the NPE firmware: ++ route -n ++ grep '^0.0.0.0 ' ++ grep UG ++ sed 's/.* //' + iface=eth0 + '[' -n eth0 ']' + readlink /sys/class/net/eth0/device + grep -q ixp4xx_mac + echo 'firmware in use' firmware in use On a slug without the NPE firmware: ++ route -n ++ grep '^0.0.0.0 ' ++ grep UG ++ sed 's/.* //' + iface=eth1 + '[' -n eth1 ']' + readlink /sys/class/net/eth1/device + grep -q ixp4xx_mac + echo 'firmware not in use' firmware not in use I also built nslu2-utils from the repository and installed it on a machine that does not have the NPE firmware. It it generated the initramfs without user intervention, whereas 0.10+r71-13 complained that the firmware file did not exist and required user intervention before it would generate the initramfs. Gordon -- Gordon Farquharson GnuPG Key ID: 32D6D676 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

