Ian Wienand wrote:
>On Wed, May 25, 2005 at 03:27:44PM +1200, Adam Bogacki wrote:
>
>
>>>Anyway, the general concept is to find the script that is being run
>>>and trace it.
>>>
>>>
>
>
>
>>Thanks again but I can't find the ntp daemon (presumably ntpd) in
>>/var/lib/dpkg
>>
>>
>
>Alright, I just reread your message and noticed that you're installing
>*ndtpd* rather than *ntpd*, which appear to be completely different
>things.
>
>The file should therefore be called /var/lib/dpkg/info/ndtpd.postinst
>
>That (barring me misreading or typing anything else) is the script
>that is failing. In general, when you get an error about a
>post-installation script failing, you can head straight to
>
>/var/lib/dpkg/info/[package].postinst
>
>and start poking around that script to see why.
>
>-i
>
>
Thanks, I found it.
I've poked around and am still a bit confused. I've attached it to see
if you can spot anything.
Cheers,
Adam..
#! /bin/sh
# postinst script for ndtpd
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
# Source debconf library
. /usr/share/debconf/confmodule
case "$1" in
configure)
# Add entry to /etc/inetd.conf
if ! grep -q ndtpd /etc/inetd.conf; then
if [ -x /usr/sbin/update-inetd ]; then
update-inetd --add "ndtp stream tcp nowait root
/usr/sbin/tcpd /usr/sbin/ndtpd --inetd"
fi
fi
# Add syslog entry
syslog-facility set info /var/log/ndtpd.log > /etc/ndtpd/syslog_entry
if [ -x /etc/init.d/sysklogd ]; then
invoke-rc.d sysklogd restart
fi
if [ -x /etc/init.d/msyslog ]; then
invoke-rc.d msyslog restart
fi
# Add user ndtpd
id ndtpd > /dev/null 2>&1 || adduser --system --home /var/lib/ndtpd --gecos
ndtpd ndtpd || true
chown ndtpd.daemon /var/run/ndtpd/
chown ndtpd.nogroup /var/lib/ndtpd/
update-ndtpd.conf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 0
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installinfo
if [ "$1" = "configure" ]; then
install-info --quiet --section "CD-ROM Book Utilities" "CD-ROM Book
Utilities" /usr/share/info/ndtpd.info
fi
# End automatically added section
# Automatically added by dh_installinfo
if [ "$1" = "configure" ]; then
install-info --quiet --section "CD-ROM Book Utilities" "CD-ROM Book
Utilities" /usr/share/info/ndtpd-ja.info
fi
# End automatically added section
exit 0
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html