From cba155c0c2bbbdb9647ed55fdf17e9e440c2d308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Mon, 24 May 2004 11:53:26 +0000 Subject: [PATCH] If nsswitch.conf does not exist, create it with the default settings. The reason for doing this is that (at least some) 4.x binaries are very unhappy if host.conf does not exist, and if we create host.conf but not nsswitch.conf, nsswitch.conf will be created at the next reboot, so it is better to create a correct nsswitch.conf right away. --- etc/rc.d/nsswitch | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/etc/rc.d/nsswitch b/etc/rc.d/nsswitch index 830467c52b8..fe84fd9ecd6 100644 --- a/etc/rc.d/nsswitch +++ b/etc/rc.d/nsswitch @@ -54,6 +54,21 @@ convert_host_conf() }' < $host_conf > $nsswitch_conf } +generate_nsswitch_conf() +{ + nsswitch_conf=$1; shift; + + cat >$nsswitch_conf <