ifolder/www-apps/ifolder3-enterprise/files/3.9.1/ifdata.patch
Mario Fetka 5db653fc3d add ifolder 3.8.4
Package-Manager: portage-2.2.0_alpha166
RepoMan-Options: --force
2013-04-18 20:55:08 +02:00

16 lines
647 B
Diff

diff -uNr ifolder3-enterprise-3.9.1.7638.orig/src/core/ifdata ifolder3-enterprise-3.9.1.7638/src/core/ifdata
--- ifolder3-enterprise-3.9.1.7638.orig/src/core/ifdata 2013-04-18 05:15:38.018388777 +0200
+++ ifolder3-enterprise-3.9.1.7638/src/core/ifdata 2013-04-18 05:18:12.984451434 +0200
@@ -4,6 +4,10 @@
then
/sbin/ifconfig | grep '\<inet\>' | cut -f2 -d' ' | cut -f1 -d' '
else
- /sbin/ifconfig | grep 'inet addr' | cut -f2 -d':' | cut -f1 -d' '
+ if [ -f /sbin/ip ] then
+ /sbin/ip addr | awk '/inet / {sub(/\/.*/, "", $2); print $2}'
+ else
+ /sbin/ifconfig | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'
+ fi
fi