Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 586638 Details for
Bug 824876
olpc-netutils should use iproute2 instead of net-tools
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
olpc-netutils-0.8.1-net-tools.patch (text/plain), 5.45 KB, created by
Jiri Popelka
on 2012-05-24 13:54:14 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Jiri Popelka
Created:
2012-05-24 13:54:14 UTC
Size:
5.45 KB
patch
obsolete
>From 0e7d550d99bbf5bfd15137eb67bb9f484aed329c Mon Sep 17 00:00:00 2001 >From: Jiri Popelka <jpopelka@redhat.com> >Date: Thu, 10 May 2012 10:24:53 +0200 >Subject: [PATCH] Replace net-tools with iproute2 > >net-tools have been deprecated for quite a long time >and tools from iproute2 should be used instead > >net-tools | iproute2 >-------------------- >'ifconfig'| 'ip addr' or 'ip link' >'route' | 'ip route' >'netstat' | 'ss' >--- > usr/bin/olpc-connections | 4 ++-- > usr/bin/olpc-log | 12 ++++++------ > usr/bin/olpc-netstatus | 22 +++++++++++----------- > 3 files changed, 19 insertions(+), 19 deletions(-) > >diff --git a/usr/bin/olpc-connections b/usr/bin/olpc-connections >index f85ef6c..1154291 100755 >--- a/usr/bin/olpc-connections >+++ b/usr/bin/olpc-connections >@@ -37,7 +37,7 @@ stats () { > dns=`awk '/^name/ {print $2}' /etc/resolv.conf|awk 'NR==1'` > salut=`sugar-telepathies|awk '/salut/ {print $2}'` > gabble=`sugar-telepathies|awk '/gabble/ {print $2}'` >-jabber=`netstat -ntpT 2> /dev/null|grep telepathy|grep ESTAB|awk '{print $5}'|sed s/:.*$//` >+jabber=`ss -ntp 2> /dev/null|grep telepathy|grep ESTAB|awk '{print $5}'|sed s/:.*$//` > xos=`sugar-xos|wc -l` > [ "$salut" == "0" ] && salut=" on " > [ "$salut" == "1" ] && salut=" ... " >@@ -49,7 +49,7 @@ xos=`sugar-xos|wc -l` > [ "$gabble" == "" ] && gabble=" " > > for ND in "$NETDEVICES"; do >- ipaddr=`ifconfig $ND|grep "inet addr"|sed s/^.*r://|awk '{print $1}'` >+ ipaddr=`ip -4 -o addr show dev $ND | awk '{ print $4}' | cut -d '/' -f 1` > let sp=15-${#ipaddr};let sp1=$sp/2;let sp2=$sp-$sp1;echo -n "${space:0:$sp1}$ipaddr${space:0:$sp2} | " > done > let sp=15-${#dns};let sp1=$sp/2;let sp2=$sp-$sp1;echo -n "${space:0:$sp1}$dns${space:0:$sp2} |" >diff --git a/usr/bin/olpc-log b/usr/bin/olpc-log >index 2f43318..1411678 100755 >--- a/usr/bin/olpc-log >+++ b/usr/bin/olpc-log >@@ -78,10 +78,10 @@ function net { > cat /home/olpc/.sugar/default/nm/networks.cfg &> $target/net/networks.cfg;echo -n = > cat /etc/NetworkManager/mesh-start &> $target/net/mesh-start;echo -n = > >- ifconfig &> $target/net/ifconfig.out;echo -n = >+ ip addr show &> $target/net/ifconfig.out;echo -n = > iwconfig &> $target/net/iwconfig.out;echo -n = >- route -n &> $target/net/route.out;echo -n = >- netstat -apT &> $target/net/netstat.out;echo -n = >+ ip route list &> $target/net/route.out;echo -n = >+ ss -ap &> $target/net/netstat.out;echo -n = > > olpc-netstatus -n &> $target/net/olpc-netstatus.out;echo -n = > olpc-mesh &> $target/net/olpc-mesh.out;echo -n = >@@ -104,10 +104,10 @@ Specify which logs to store using the options. Default is all logs. > > Options: > >- -n network logs : ifconfig output >+ -n network logs : ip addr show output > iwconfig output >- route output >- netstat -apT output >+ ip route list output >+ ss -ap output > olpc-netstatus output > olpc-mesh output > presenceservice XO list >diff --git a/usr/bin/olpc-netstatus b/usr/bin/olpc-netstatus >index c7d4146..fccc7a0 100755 >--- a/usr/bin/olpc-netstatus >+++ b/usr/bin/olpc-netstatus >@@ -24,7 +24,7 @@ function info { > echo > echo "Model : "`get_ofw_file /model` > echo "Serial : "`get_ofw_file /serial-number` >-echo "MAC : "`ifconfig eth0|awk '/^eth0/ {print $5}'` >+echo "MAC : "`ip link show dev eth0 | awk '/link/ {print $2}'` > echo > if [ -e /boot/olpc_build ]; then > echo "Build : "`cat /boot/olpc_build` >@@ -57,10 +57,10 @@ function net { > > echo > #ip >-for i in `ifconfig|grep HWaddr|awk '{print $1}'` >+for i in `ls /sys/class/net | grep -v '^lo$'` > do > echo -n "IP $i : " >- echo `ifconfig $i|grep "inet addr"|awk 'BEGIN{FS="addr:"}{print $2}'|awk '{print $1}'` >+ echo `ip -4 -o addr show dev $i | awk '{ print $4}' | cut -d '/' -f 1` > done > > #nameserver >@@ -76,7 +76,7 @@ sed 's/^.*$/ &/'|sed '1 s/ /Telepathy : /' > > #jabber > jabber='' >-jabber=`netstat -tpT --numeric-ports 2> /dev/null|grep telepathy|grep ESTABLISHED|awk '{print $5}'|awk 'BEGIN{FS=":522"}{print $1}'` >+jabber=`ss -tprn 2> /dev/null|grep telepathy|grep ESTAB|awk '{print $5}'|awk 'BEGIN{FS=":522"}{print $1}'` > echo 'Jabber : '$jabber > > #xos >@@ -111,7 +111,7 @@ echo '' > > #ethernet > ethernet='' >-for i in `ifconfig|grep HWaddr|awk '{print $1}'` >+for i in `ls /sys/class/net | grep -v '^lo$'` > do > iwconfig $i 2>&1|grep "no wireless" > /dev/null && ethernet="$i $ethernet" > done >@@ -127,18 +127,18 @@ msh='' > ipeth='' > ipmsh='' > >-for i in `ifconfig|grep HWaddr|grep ^eth|awk '{print $1}'` >+for i in `ls /sys/class/net | grep '^eth'` > do >- ifconfig $i|grep "inet addr" > /dev/null && eth=$i >+ ip -4 -o addr show dev $i | grep inet > /dev/null && eth=$i > done > >-for i in `ifconfig|grep HWaddr|grep ^msh|awk '{print $1}'` >+for i in `ls /sys/class/net | grep '^msh'` > do >- ifconfig $i 2>&1|grep "inet addr" > /dev/null && msh=$i >+ ip -4 -o addr show dev $i 2>&1 | grep inet > /dev/null && msh=$i > done > >-[ -n "$eth" ] && ipeth=`ifconfig $eth|sed -n '/t addr/s/^[^:]*:\([^ ]*\) .*$/\1/p'` >-[ -n "$msh" ] && ipmsh=`ifconfig $msh|sed -n '/t addr/s/^[^:]*:\([^ ]*\) .*$/\1/p'` >+[ -n "$eth" ] && ipeth=`ip -4 -o addr show dev $eth | awk '{ print $4}' | cut -d '/' -f 1` >+[ -n "$msh" ] && ipmsh=`ip -4 -o addr show dev $msh | awk '{ print $4}' | cut -d '/' -f 1` > > config='' > if [ -n "$ipeth" ] >-- >1.7.10.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 824876
: 586638