From b67a68dedd62af4036620a148fbae4fbe4fa494c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 29 Aug 2013 15:35:06 +0200 Subject: [rootfs-stage32] Added more checks to udhcpc script when deciding whether to use resolvconf or not. Fixes #496 --- .../rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx index fd88ca30..69380a2f 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/udhcpc-openslx @@ -56,8 +56,10 @@ case "$1" in printf -v CONF "${CONF}nameserver $i\n" done - if [ -x /sbin/resolvconf ]; then + if [ -x /sbin/resolvconf ] && [ -L /etc/resolv.conf ] && [ -d /etc/resolvconf/update.d ]; then # Automatic handling :-) + resolvconf --create-runtime-directories + resolvconf --enable-updates echo -n "$CONF" | resolvconf -a "${interface}.udhcpc" else # Manual handling required :-( @@ -149,7 +151,7 @@ case "$1" in echo "NFS is active, not removing old ip adress. warning: lease may expire after a while." fi - if [ -x /sbin/resolvconf ]; then + if [ -x /sbin/resolvconf ] && [ -L /etc/resolv.conf ] && [ -d /etc/resolvconf/update.d ]; then # Automatic handling :-) resolvconf -d "${interface}.udhcpc" else -- cgit v1.2.3-55-g7522