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

From: Thiébaud Weksteen <[email-masked]>
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
@@ -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:  [email-masked]
Help:         [email-masked]
---