On Mon, Jul 12, 1999 at 05:25:38PM +0200, Jerome Marant wrote: > Can I find somewhere skeletons for postinst, preinst, postrm and prerm > scripts so avoiding the whole rewriting that leads to many bugs ? You could always use mine. apt-get source xfree86-1 and then look in xfree86-1-3.3.3.1/debian for *.template files. If you have a slow link you will want to manipulate the source package on a remote machine with a fast connection to the net. The XFree86 source package is huge. Better yet, I'll MIME-attach them. -- G. Branden Robinson | One man's theology is another man's Debian GNU/Linux | belly laugh. branden@ecn.purdue.edu | -- Robert Heinlein cartoon.ecn.purdue.edu/~branden/ |
#!/bin/sh
# Debian FOO package pre-installation script
# Copyright 1998, 1999 Branden Robinson. Licensed under the GNU GPL.
# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
set -e
trap "echo ;\
echo 'Received signal. Aborting installation of FOO package.' ;\
echo ;\
exit 1" 1 2 3 15
case "$1" in
install|upgrade) ;;
abort-upgrade) exit 0 ;;
*)
echo "ERROR: FOO preinst called with unknown argument \"$1\"."
echo "Aborting installation of FOO package."
exit 1 ;;
esac
exit
#!/bin/sh
# Debian FOO package post-installation script
# Copyright 1998, 1999 Branden Robinson. Licensed under the GNU GPL.
# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
set -e
# cleanup () {
# # unroll changes in FOO preinst
# }
trap "echo ;\
echo 'Received signal. Aborting configuration of FOO package.' ;\
# echo -n 'Cleaning up...' ;\
# cleanup ;\
# echo 'done.' ;\
echo ;\
exit 1" 1 2 3 15
case "$1" in
configure) ;;
abort-upgrade|abort-remove|abort-deconfigure)
# cleanup
exit 0 ;;
*)
echo "ERROR: FOO postinst called with unknown argument \"$1\"."
echo "Aborting configuration of FOO package."
# echo -n "Cleaning up..."
# cleanup
# echo "done."
exit 1 ;;
esac
exit
#!/bin/sh
# Debian FOO package pre-removal script
# Copyright 1998, 1999 Branden Robinson. Licensed under the GNU GPL.
# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
set -e
trap "echo ;\
echo 'Received signal. Aborting removal of FOO package.' ;\
echo ;\
exit 1" 1 2 3 15
case "$1" in
remove) ;;
upgrade|failed-upgrade|deconfigure) exit 0 ;;
*)
echo "ERROR: FOO prerm called with unknown argument \"$1\"."
echo "Aborting removal of FOO package."
exit 1 ;;
esac
exit
#!/bin/sh
# Debian FOO package post-removal script
# Copyright 1998, 1999 Branden Robinson. Licensed under the GNU GPL.
# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
set -e
trap "echo ;\
echo 'Received signal. Aborting removal of FOO package.' ;\
echo ;\
exit 1" 1 2 3 15
case "$1" in
remove) ;;
purge) ;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) exit 0 ;;
*)
echo "ERROR: FOO postrm called with unknown argument \"$1\"."
echo "Aborting removal of FOO package."
exit 1 ;;
esac
exit
Attachment:
pgpMu22489CG7.pgp
Description: PGP signature