Hi all,
I'm knocking up a script which is used to determine if the box has a lan connection or not.. I was hoping to use:
The /etc/init.d/net.eth0 --quiet status command returns true/false, but as I understand it, bash is a bit funny about booleans?
Any pointers? Ta.
I'm knocking up a script which is used to determine if the box has a lan connection or not.. I was hoping to use:
Code:
#!/bin/bash
if [ `/etc/init.d/net.eth0 --quiet status` ]
then
echo This machine has a LAN connection
else
echo This machine does not have a LAN connection
fi
Any pointers? Ta.
Last edited: