You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Mladen Turk (JIRA)" <ji...@apache.org> on 2010/05/17 10:02:42 UTC
[jira] Commented: (TS-355) Autodetect default network interface
[ https://issues.apache.org/jira/browse/TS-355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868125#action_12868125 ]
Mladen Turk commented on TS-355:
--------------------------------
More correct Linux script
/sbin/ifconfig | sed 's/^ *$/CRLF/g' | tr '\n' ' ' | sed 's/CRLF /\n/g' | grep -v LOOPBACK | grep 'UP.*RUNNING' | head -1 | awk '{print $1;}'
Complex because info spreads across multiple lines, so we create one line for each iface block and then grep
For Solaris, BSD, Mac
/sbin/ifconfig -a | grep 'UP.*RUNNING' | grep -v LOOPBACK | head -1 | awk -F: '{ print $1;}'
> Autodetect default network interface
> ------------------------------------
>
> Key: TS-355
> URL: https://issues.apache.org/jira/browse/TS-355
> Project: Traffic Server
> Issue Type: New Feature
> Components: Build
> Reporter: Mladen Turk
> Assignee: Mladen Turk
> Priority: Minor
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Currently we instruct the user to specify the cluster interface as part of build procedure (see INSTALL)
> We can detect the interface automatically on some platforms
> Linux
> /sbin/ifconfig -a | grep ^e.* | head -1 | awk '{print $1;}'
> Solaris, FreeBsd (probably OSX)
> /sbin/ifconfig -a | grep -v LOOPBACK | grep UP | head -1 | awk -F: '{print $1;}'
> Additional configure option (--with-cluster-interface=IFACE) can be added to explicitly
> specify some other interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.