summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-05-06 12:01:00 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-05-06 12:01:00 +0200
commit607e2212857a5afe94d16b11635346950c7bac78 (patch)
tree4c8ce170bc90ed68d9e70683d7f0a73270173a0c
parent5618d9334ed4e180ebd355aaa294f5a22ab0d842 (diff)
downloadalpine-conf-607e2212857a5afe94d16b11635346950c7bac78.zip
setup-interfaces: do not configure lo on LXC
-rw-r--r--setup-interfaces.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup-interfaces.in b/setup-interfaces.in
index be75e90..1bf0713 100644
--- a/setup-interfaces.in
+++ b/setup-interfaces.in
@@ -400,8 +400,10 @@ prompt_for_interfaces() {
index=$(( $index + 1 ))
done
- echo "type=loopback" > 000~lo.conf
- echo "" > interface
+ if [ "$(openrc --sys)" != "LXC" ] || ! ip addr show lo | grep -q 'inet.*127\.0'; then
+ echo "type=loopback" > 000~lo.conf
+ echo "" > interface
+ fi
hostname=$(cat $ROOT/etc/hostname 2>/dev/null)
for i in *.conf ; do