diff --git a/pkg/init/bin/rc.init b/pkg/init/bin/rc.init index 7b5e65df8..883c655a0 100755 --- a/pkg/init/bin/rc.init +++ b/pkg/init/bin/rc.init @@ -98,10 +98,8 @@ ip addr add 127.0.0.1/8 dev lo brd + scope host ip route add 127.0.0.0/8 dev lo scope host ip link set lo up -# for containerising dhcpcd and other containers that need writable etc -mkdir /tmp/etc -mv /etc/resolv.conf /tmp/etc/resolv.conf -ln -snf /tmp/etc/resolv.conf /etc/resolv.conf +# for containerizing dhcpcd and other containers that need writable /etc/resolv.conf +[ -L /etc/resolv.conf ] && mkdir -p $(dirname $(readlink -n /etc/resolv.conf)) # remount rootfs as readonly mount -o remount,ro /