Filewatcher File Search
FTP Search
  
Directory 
  
Content Search 
   
pkg://ax25-apps_0.0.6-14.1_ia64.deb:142222/postinst  info  downloads

#! /bin/sh -e
# postinst script for ax25-apps
#
# see: dh_installdeb(1)


# Source the debconf library.
. /usr/share/debconf/confmodule

# 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/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'.

config_ax25_apps(){
    # Check result of tools being setuid
    db_get ax25-apps/suid_listen
	if [ "$RET" = "true" ]; then
	{
	  # Try registering with dpkg-statoverride first
	  if [ -x /usr/sbin/dpkg-statoverride ] ; then
	      /usr/sbin/dpkg-statoverride --update --add --force root root 4755 /usr/bin/listen
	  else
	      # change program directly
	      chmod 4755 /usr/bin/listen
	  fi
	}  
	else
	{
	    # set permission on /usr/bin/listen to know state not suid
	    chmod 0755 /usr/bin/listen
	    #if dpkg-statoverride is installed, remove listen from overrides
	   if [ -x /usr/sbin/dpkg-statoverride ] ; then
	        /usr/sbin/dpkg-statoverride --remove --force /usr/bin/listen &> /dev/null
	    fi
        }
        fi
}

convert_to_statoverride(){
    #try to import suidmanager setting for listen
    /usr/sbin/dpkg-statoverride --add --force root root 0755 /usr/bin/listen > /dev/null 2>&1
}

case "$1" in
    install)
        config_ax25_apps
    ;;
    
    upgrade)
        convert_to_statoverride
        config_ax25_apps
    ;;

    configure)
        config_ax25_apps
    ;;
    
    abort-upgrade)
    ;;

    *)
        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_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
	update-menus
fi
# End automatically added section

exit 0

Results 1 - 1
Help - FTP Sites List - Software Dir.
Searching half a billion files worldwide
© 1997-2009 MARUHN Internet Solutions