diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-21 14:31:06 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-12-21 14:32:48 +0000 |
commit | e56f184a7b4be0a4a48ef818fdd72024c6978c25 (patch) | |
tree | 62d6979be2e1701abd6c92c3c4e657b6a3109d6f | |
parent | b4f04adbf69910f681e3e71f8d82316e39952fe9 (diff) | |
download | alpine_aports-e56f184a7b4be0a4a48ef818fdd72024c6978c25.tar.bz2 alpine_aports-e56f184a7b4be0a4a48ef818fdd72024c6978c25.tar.xz alpine_aports-e56f184a7b4be0a4a48ef818fdd72024c6978c25.zip |
main/alpine-conf: fix error message for setup-interfaces
ref #1404
(cherry picked from commit ed2761657813f46e8975756b317f7b8ffdd850e1)
-rw-r--r-- | main/alpine-conf/0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch | 28 | ||||
-rw-r--r-- | main/alpine-conf/APKBUILD | 6 |
2 files changed, 32 insertions, 2 deletions
diff --git a/main/alpine-conf/0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch b/main/alpine-conf/0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch new file mode 100644 index 0000000000..976f64bb17 --- /dev/null +++ b/main/alpine-conf/0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From ab68d58344a5e5421a52dccace155b5a42be4f14 Mon Sep 17 00:00:00 2001 | ||
2 | From: Natanael Copa <ncopa@alpinelinux.org> | ||
3 | Date: Fri, 21 Dec 2012 15:29:06 +0100 | ||
4 | Subject: [PATCH] setup-interfaces: fix ip: can't find device 'eth1.3' message | ||
5 | |||
6 | ref #1404 | ||
7 | --- | ||
8 | setup-interfaces.in | 4 +++- | ||
9 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/setup-interfaces.in b/setup-interfaces.in | ||
12 | index c4ffa47..263beec 100755 | ||
13 | --- a/setup-interfaces.in | ||
14 | +++ b/setup-interfaces.in | ||
15 | @@ -73,7 +73,9 @@ get_default_mask() { | ||
16 | } | ||
17 | |||
18 | get_default_gateway() { | ||
19 | - ip route show dev $1 | awk '/^default/ {print $3}' | ||
20 | + if iface_exists $1; then | ||
21 | + ip route show dev $1 | awk '/^default/ {print $3}' | ||
22 | + fi | ||
23 | } | ||
24 | |||
25 | ipaddr_help() { | ||
26 | -- | ||
27 | 1.8.0.2 | ||
28 | |||
diff --git a/main/alpine-conf/APKBUILD b/main/alpine-conf/APKBUILD index f0a4df7ca5..2687142022 100644 --- a/main/alpine-conf/APKBUILD +++ b/main/alpine-conf/APKBUILD | |||
@@ -1,11 +1,12 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=alpine-conf | 2 | pkgname=alpine-conf |
3 | pkgver=2.12.0 | 3 | pkgver=2.12.0 |
4 | pkgrel=0 | 4 | pkgrel=1 |
5 | pkgdesc="Alpine configuration management scripts" | 5 | pkgdesc="Alpine configuration management scripts" |
6 | url=http://git.alpinelinux.org/cgit/$pkgname | 6 | url=http://git.alpinelinux.org/cgit/$pkgname |
7 | depends="openrc" | 7 | depends="openrc" |
8 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 | 8 | source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 |
9 | 0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch | ||
9 | " | 10 | " |
10 | 11 | ||
11 | arch="all" | 12 | arch="all" |
@@ -36,4 +37,5 @@ package() { | |||
36 | ln -s lbu "$pkgdir"/sbin/lbu_$i | 37 | ln -s lbu "$pkgdir"/sbin/lbu_$i |
37 | done | 38 | done |
38 | } | 39 | } |
39 | md5sums="4038a3be9a785ead649d913e208e2bd8 alpine-conf-2.12.0.tar.bz2" | 40 | md5sums="4038a3be9a785ead649d913e208e2bd8 alpine-conf-2.12.0.tar.bz2 |
41 | 1f2ee5791a9bb40bd5e9862f60299ce2 0001-setup-interfaces-fix-ip-can-t-find-device-eth1.3-mes.patch" | ||