Commit a45e4970 authored by Robert Ricci's avatar Robert Ricci
Browse files

A hacky little script to get the name of the the proper 'internet'

interface  on a node in an Emulab experiment. Assumes the name of
the 'Internet' LAN is 'planetc'.
parent efe4cd2a
HOSTNAME=`cat /var/emulab/boot/nickname | sed 's/\..*//'`
LINKIP=`grep "$LINK" /etc/hosts | cut -f1`
IFACENAME=`ifconfig -a | perl -e 'while(<>) { if (/^(eth\d+)/) { $if = $1; } if (/10.1/) { print "$if\n"; exit 0; }} exit 1;'`
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment