summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsc157166 <none@none>2006-06-02 03:50:17 -0700
committersc157166 <none@none>2006-06-02 03:50:17 -0700
commit92ba28205c4c02d017c76a30f957fb224a3582d0 (patch)
treece24c6164c98c6cdf5915b66b5addc6c8a6a0ed1 /usr/src
parent3ee1b53bbcd61133e4b5b407bd8302e0ebb3a5bc (diff)
downloadillumos-joyent-92ba28205c4c02d017c76a30f957fb224a3582d0.tar.gz
6429769 After upgrading to SNV_40, nsswitch.conf is modified incorrectly with tnrhdb and tnrhtp entries.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/pkgdefs/common_files/i.nsswitch43
1 files changed, 25 insertions, 18 deletions
diff --git a/usr/src/pkgdefs/common_files/i.nsswitch b/usr/src/pkgdefs/common_files/i.nsswitch
index a14c96ba4e..04dd682ad0 100644
--- a/usr/src/pkgdefs/common_files/i.nsswitch
+++ b/usr/src/pkgdefs/common_files/i.nsswitch
@@ -302,26 +302,33 @@ do
rm -f /tmp/d.$$
# If the file doesn't have Trusted Extensions networking
- # database (TNdb) entries, add appropriate entries. Default
- # to everything if we can't figure out what is appropriate.
- for DB in tnrhtp tnrhdb
- do
- grep $DB: $dest > /dev/null 2>&1
- if [ $? != 0 ]; then
- ATTR="files ldap"
- egrep '/etc/nsswitch\.(dns|files)' $dest >\
- /dev/null 2>&1
- if [ $? = 0 ] ; then
- ATTR="files"
- fi
- grep '/etc/nsswitch.ldap' $dest >/dev/null \
- 2>&1
- if [ $? = 0 ] ; then
+ # database (TNdb) entries, add appropriate entries.
+ # TNdb entries is not supported in nis/nisplus, So avoid
+ # appending these entries in /etc/nsswitch.conf.
+ # And for rest of the name services append these TNdb entries
+ # according to name service.
+ egrep '/etc/nsswitch.(nis|nisplus)' $dest >\
+ /dev/null 2>&1
+ if [ $? != 0 ] ; then
+ for DB in tnrhtp tnrhdb
+ do
+ grep $DB: $dest > /dev/null 2>&1
+ if [ $? != 0 ]; then
ATTR="files ldap"
+ egrep '/etc/nsswitch\.(dns|files)' $dest >\
+ /dev/null 2>&1
+ if [ $? = 0 ] ; then
+ ATTR="files"
+ fi
+ grep '/etc/nsswitch.ldap' $dest >/dev/null \
+ 2>&1
+ if [ $? = 0 ] ; then
+ ATTR="files ldap"
+ fi
+ echo "${DB}: ${ATTR}" >> $dest
fi
- echo "${DB}: ${ATTR}" >> $dest
- fi
- done
+ done
+ fi
fi
done