[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debmake inserting stuff in postinst file



I use debmake to create packages and want to stop it from adding
entries to the postinst file.

I created the following debian/postinst file :

--
#!/bin/sh
#
# postinst script for the jazip package

set -e

case "$1" in
    configure)     
        if [ -x /usr/sbin/suidregister ]; then
           suidregister -s jazip /usr/bin/jazip root root 4755
        else       
           chown root.root /usr/bin/jazip
           chmod 4755 /usr/bin/jazip
        fi

        if [ -x /usr/bin/update-menus ] ; then update-menus ; fi

        test -f /etc/jazip.conf || jazipconfig --non-interactive
        ;;

    abort-upgrade|abort-remove|abort-deconfigure)
        ;;
    *)
        echo "postinst called with unknown argument \`$1'" >&2
        ;;
esac

exit 0                 
--

Upon building the package, the postinst file gets installed
correctly but debmake adds the following to the end of the
installed file:

--
# Permission processing inserted by debmake on Tue, 18 May 1999 13:01:56 -0400
if [ -x /usr/sbin/suidregister ]; then
        suidregister -s jazip /usr/bin/jazip root root 4755
else
        chown root.root /usr/bin/jazip
        chmod 4755 /usr/bin/jazip
fi
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
--

I had already inserted this stuff for the `case' of `configure'.
Since I have `exit 0' before this code, it never gets executed.
But it's still a nuisance.  

How do I tell debmake to _not_ insert these things?  

Why doesn't debmake use the `case' switch as most packages seem to?

Shouldn't I be using the `configure' `case' in the first place?

As usual, thanks a lot!
-- 
Peter Galbraith, research scientist          <GalbraithP@dfo-mpo.gc.ca>
Maurice Lamontagne Institute, Department of Fisheries and Oceans Canada
P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada. 418-775-0852 FAX: 775-0546
    6623'rd GNU/Linux user at the Counter - http://counter.li.org/ 


Reply to: