aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-12-24 15:50:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-12-24 15:50:26 +0000
commit09154e4efec109021467a887002f24447305c51c (patch)
tree0ae070c1ec828011cfb456086335abf17c46576c /main/busybox-initscripts
parent525c419c22406cb4c50112d1cfe4a614a12ff14e (diff)
downloadaports-09154e4efec109021467a887002f24447305c51c.tar.bz2
aports-09154e4efec109021467a887002f24447305c51c.tar.xz
main/busybox-initscripts: udhcpc: find the interface even if we dont have /sys
Needed for LXC
Diffstat (limited to 'main/busybox-initscripts')
-rw-r--r--main/busybox-initscripts/APKBUILD4
-rw-r--r--main/busybox-initscripts/default.script6
2 files changed, 7 insertions, 3 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD
index 5086ce4779..b1d7f9e7a6 100644
--- a/main/busybox-initscripts/APKBUILD
+++ b/main/busybox-initscripts/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=2.2
-pkgrel=10
+pkgrel=11
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
arch="noarch"
@@ -73,4 +73,4 @@ ad1556961294e4aa2abca6be52138b7c dvbdev
daf57f3d0372f825ddc05b00973e5afe usbdev
30b0c85956b6701caf55309a17e537f6 usbdisk_link
826d85313ca7a4a0205d63bd58b7d01f xvd_links
-a346e7a30915856bc53987846e09724c default.script"
+c6470658e54f040bb85cb1fc7b56f10c default.script"
diff --git a/main/busybox-initscripts/default.script b/main/busybox-initscripts/default.script
index 5447080ec9..1231ea9c9f 100644
--- a/main/busybox-initscripts/default.script
+++ b/main/busybox-initscripts/default.script
@@ -39,7 +39,11 @@ is_wifi() {
}
if_index() {
- cat /sys/class/net/$interface/ifindex
+ if [ -e /sys/class/net/$interface/ifindex ]; then
+ cat /sys/class/net/$interface/ifindex
+ else
+ ip link show dev $interface | head -n1 | cut -d: -f1
+ fi
}
calc_metric() {