postinst is in nis 3.17-32ubuntu6.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | #! /bin/sh
#
# postinst NIS suite postinst script.
# configures the nis stuff.
#
# Version: nis.postinst 3.9 28-Jun-2001 miquels
#
# Install the defaults file if needed, and update the NISSERVER
# setting if the preinst left a settings file behind.
install_defaults () {
[ ! -s /etc/default/nis ] || return 0
NISSERVER=false
if [ -f /etc/default/nis.settings ]
then
. /etc/default/nis.settings
fi
sed -e 's/^\(NISSERVER\)=.*$/\1='"$NISSERVER/" \
< /usr/share/nis/nis.default > /etc/default/nis
rm -f /etc/default/nis.settings
}
set -e
umask 022
# Source debconf library.
. /usr/share/debconf/confmodule
db_version 2.0 || { echo "nis.config: need DebConf 2.0 or later"; exit 1; }
install_defaults
. /etc/default/nis
# Retrieve the domain from Debconf and set it.
db_get nis/domain || true
if [ "$RET" != "" ]
then
echo $RET > /etc/defaultdomain
fi
# Convert the old ypserv.conf to the new format.
if [ -f /etc/ypserv.conf ]
then
/usr/lib/yp/convert-ypserv-conf /etc/ypserv.conf
fi
# Halt debconf so we don't leave the control fd open to the daemon
db_stop
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ypbind" ] || [ -e "/etc/init/ypbind.conf" ]; then
if [ ! -e "/etc/init/ypbind.conf" ]; then
update-rc.d ypbind defaults >/dev/null
fi
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
invoke-rc.d ypbind $_dh_action || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f ypbind remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/start-ypbind" ]; then
if [ ! -e "/etc/init/start-ypbind.conf" ]; then
update-rc.d start-ypbind defaults >/dev/null
fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f start-ypbind remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ypserv" ] || [ -e "/etc/init/ypserv.conf" ]; then
if [ ! -e "/etc/init/ypserv.conf" ]; then
update-rc.d ypserv defaults >/dev/null
fi
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
invoke-rc.d ypserv $_dh_action || exit $?
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f ypserv remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/yppasswdd" ]; then
if [ ! -e "/etc/init/yppasswdd.conf" ]; then
update-rc.d yppasswdd defaults >/dev/null
fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f yppasswdd remove >/dev/null || exit $?
# End automatically added section
# Automatically added by dh_installinit
if [ -x "/etc/init.d/ypxfrd" ]; then
if [ ! -e "/etc/init/ypxfrd.conf" ]; then
update-rc.d ypxfrd defaults >/dev/null
fi
fi
# End automatically added section
# Automatically added by dh_installinit
update-rc.d -f ypxfrd remove >/dev/null || exit $?
# End automatically added section
# /sbin/unix_chkpwd is installed setgid shadow by default; for NIS we need
# setuid root. (See #155583)
if ! dpkg-statoverride --list /sbin/unix_chkpwd >/dev/null; then
dpkg-statoverride --update --add root root 4755 /sbin/unix_chkpwd
fi
exit 0
|