Mail archive
alpine-devel

[alpine-devel] [PATCH] setup-interfaces: warn if no interfaces are found

From: ThiƩbaud Weksteen <thiebaud_at_weksteen.fr>
Date: Sat, 9 Jul 2016 17:10:22 +1000

---
If no interfaces are found during the setup, let the user know
before continuing.
 setup-interfaces.in | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/setup-interfaces.in b/setup-interfaces.in
index b4121d5..b907417 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
_at_@ -473,6 +473,10 @@ prompt_for_interfaces() {
 		index=$(( $index + 1 ))
 	done
 
+	if [ $index -eq 1 ]; then
+		echo "No network interfaces have been initialized!"
+	fi
+
 	if [ "$(openrc --sys)" != "LXC" ] || ! ip addr show lo | grep -q 'inet.*127\.0'; then
 		echo "type=loopback" > 000~lo.conf
 		echo "" > interface
-- 
2.7.4
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Sat Jul 09 2016 - 17:10:22 GMT