[Ovirt-devel] [PATCH] Make configure_from_network function check if network is up, before touching it
Alan Pevec
apevec at gmail.com
Fri Feb 5 11:13:07 UTC 2010
Pushed, thanks!
Alan
On Fri, Feb 5, 2010 at 11:34 AM, Ricardo Marin Matinata
<matinata at br.ibm.com> wrote:
> On Fri, 2010-02-05 at 00:48 +0100, Alan Pevec wrote:
>> > +# Check if networking is already up
>> > +network_up () {
>> > + UPIFS=$(/sbin/ip -o link show up | awk -F ": " '{ print $2 }' | grep -v lo | wc -l)
>> > + test -n "${UPIFS}" -a "${UPIFS}" -gt "0"
>> > + return $?
>>
>> or just:
>> network_up () {
>> test -n "$(/sbin/ip -o link show up | cut -d: -f2 | grep -v 'lo$')"
>> }
>>
>> If you agree, I'll amend and push
>
> Agree.
>
> --
> Ricardo Marin Matinata
> Adv. Software Engineer | Linux Technology Center
> IBM Brazil | Hortolandia | SP
> matinata br ibm com
More information about the ovirt-devel
mailing list