summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/nsswitch
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-05-01 11:02:48 +0000
committerdes <des@FreeBSD.org>2006-05-01 11:02:48 +0000
commita604f42a00c3fd1c50b1217689f386ac51947a44 (patch)
treea5c2f767e71ba2a8b4aebb59beaddba0264461fc /etc/rc.d/nsswitch
parent89db8ad09a93509cd9a361825322bc954dd3d677 (diff)
downloadFreeBSD-src-a604f42a00c3fd1c50b1217689f386ac51947a44.zip
FreeBSD-src-a604f42a00c3fd1c50b1217689f386ac51947a44.tar.gz
Update host.conf every time nsswitch.conf changes, instead of just creating
it if it does not exist. Submitted by: Rostislav Krasny <rosti.bsd@gmail.com> MFC after: 2 weeks
Diffstat (limited to 'etc/rc.d/nsswitch')
-rw-r--r--etc/rc.d/nsswitch4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/rc.d/nsswitch b/etc/rc.d/nsswitch
index 68e841a..de12b56 100644
--- a/etc/rc.d/nsswitch
+++ b/etc/rc.d/nsswitch
@@ -152,7 +152,9 @@ nsswitch_start()
# Generate host.conf for compatibility
#
- if [ ! -f "/etc/host.conf" ]; then
+ if [ ! -f "/etc/host.conf" -o \
+ "/etc/host.conf" -ot "/etc/nsswitch.conf" ]
+ then
echo 'Generating host.conf.'
generate_host_conf /etc/nsswitch.conf /etc/host.conf
fi
OpenPOWER on IntegriCloud