summaryrefslogtreecommitdiff
path: root/libc.in
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2016-04-17 21:55:09 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2016-04-17 21:55:09 +0000
commit4fc7e3dbbfe1636056d88193f751420d23456c78 (patch)
tree4457bee85ed22c027a46f980b92d13e79fec1721 /libc.in
parentd2b324ed6092b2aeb56a15c7f6ed88cbd870361f (diff)
Diffstat (limited to 'libc.in')
-rw-r--r--libc.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/libc.in b/libc.in
index 3be134bfc83f..aed7f7d0ff08 100644
--- a/libc.in
+++ b/libc.in
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2007-2014 Roy Marples
+# Copyright (c) 2007-2016 Roy Marples
# All rights reserved
# libc subscriber for resolvconf
@@ -97,7 +97,6 @@ elif [ -d "$SYSCONFDIR"/resolvconf ]; then
fi
: ${resolv_conf:=/etc/resolv.conf}
: ${libc_service:=nscd}
-: ${libc_restart:=@RESTARTCMD ${libc_service}@}
: ${list_resolv:=@SBINDIR@/resolvconf -l}
if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then
resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)"
@@ -229,7 +228,14 @@ fi
# Create our resolv.conf now
(umask 022; printf %s "$newconf" >"$resolv_conf")
-eval $libc_restart
+if [ -n "$libc_restart" ]; then
+ eval $libc_restart
+elif [ -n "$RESTARTCMD" ]; then
+ set -- ${libc_service}
+ eval $RESTARTCMD
+else
+ @SBINDIR@/resolvconf -r ${libc_service}
+fi
retval=0
# Notify users of the resolver