pkg://apmd_3.2.2-3_sparc.deb:57186/postinst
info downloads
#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux apmd package
#
# Written by Dirk Eddelbuettel <edd@debian.org>
# Debconf changes added by Chris Hanson <cph@debian.org>
set -e
umask 022
case "${1}" in
(configure)
. /usr/share/debconf/confmodule || exit 0
# Rejection of APM events doesn't yet work; see apmd_proxy.
# CONFFILE=/etc/apm/apmd_proxy.conf
# TEMPLATE=/usr/share/apmd/apmd_proxy.conf
# SEDFILE="${CONFFILE}.sed.$$"
# TMPFILE="${CONFFILE}.tmp.$$"
#
# trap "rm -f ${SEDFILE} ${TMPFILE}" EXIT INT QUIT TERM
#
# db_get apmd/overwrite-config-file || true
# if [ "${RET}" = "true" ]; then
#
# # Convert the debconf bindings to a sed script that will
# # insert the bindings into the configuration file.
# rm -f "${SEDFILE}" || true
# xfer_binding ()
# {
# db_get "${2}" || true
# echo "s%^${1}=\(.*\)\$%${1}=${RET}%;" >> "${SEDFILE}"
# }
# xfer_binding SUSPEND_ON_AC apmd/suspend-on-ac
#
# # Apply the sed script to the template file to create the
# # configuration file.
# cat "${TEMPLATE}" | sed -f "${SEDFILE}" > "${TMPFILE}"
# rm -f "${SEDFILE}" || true
# mv -f "${TMPFILE}" "${CONFFILE}"
#
# fi
db_stop
if [ -z "$(ls /etc/apm/suspend.d/*hwclock 2> /dev/null)" ]; then
mkdir -p /etc/apm/suspend.d
ln -sf ../scripts.d/hwclock /etc/apm/suspend.d/99hwclock
fi
if [ -z "$(ls /etc/apm/resume.d/*hwclock 2> /dev/null)" ]; then
mkdir -p /etc/apm/resume.d
ln -sf ../scripts.d/hwclock /etc/apm/resume.d/00hwclock
fi
;;
(abort-upgrade|abort-remove|abort-deconfigure)
;;
(*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ -x "/etc/init.d/apmd" ]; then
update-rc.d apmd defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d apmd start || exit 0
else
/etc/init.d/apmd start || exit 0
fi
fi
# End automatically added section
exit 0