postinst is in gnuspool 1.7.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | #!/bin/sh
# postinst script for gnuspool
#
# Copyright 2009 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# 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>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
perm_gnuspool() {
chown gnuspool:daemon $*
chmod 755 $*
}
perm_suid_gnuspool() {
chown gnuspool:daemon $*
chmod 4755 $*
}
perm_suid_root() {
chown root:root $*
chmod 4755 $*
}
perm_sgid_tty() {
chown gnuspool:tty $*
chmod 2755 $*
}
perm_sugid_gnuspool() {
chown gnuspool:daemon $*
chmod 6755 $*
}
perm_sugid_root() {
chown root:daemon $*
chmod 6755 $*
}
fixperms() {
origdir=`pwd`
cd /var/spool
perm_gnuspool gnuspool
cd /usr/bin
perm_suid_gnuspool gspl-rpr gspl-pr gspl-charge gspl-pq gspl-start gspl-user gspl-ulist \
gspl-uchange gspl-plist gspl-qchange gspl-qlist gspl-qdel gspl-stop
perm_suid_gnuspool gspl-xpq gspl-xuser
perm_suid_gnuspool gspl-lpq gspl-lprm
perm_suid_gnuspool gspl-lpcover gspl-lpstatc
cd /usr/sbin
perm_gnuspool gspl-ptrinstall gspl-pmenu gspl-hostedit gspl-xhostedit gspl-passwd
perm_gnuspool gspl-cjlist gspl-cplist gspl-spuconv gspl-ripc gspl-setspdir gspl-netwcmd
perm_gnuspool gspl-getsnmp
cd /usr/lib/gnuspool
perm_gnuspool .
perm_suid_root spshed spexec spmdisp sppwchk xtnetserv
perm_suid_gnuspool spd spjobdump
perm_gnuspool spdinit
perm_sgid_tty spwrite dosspwrite
perm_gnuspool pclbanner psbanner
perm_gnuspool gtksave
perm_suid_root xtlprm xtlpd xtlpq xtlpc
perm_gnuspool xtlhp xtftp xtelnet
perm_suid_root xilp
cd /usr/lib/gnuspool/cgi-bin
perm_gnuspool .
perm_sugid_gnuspool sqcgi sqvcgi sqdcgi sqccgi sqcrcgi spcgi spccgi
#perm_sugid_root rsqcgi rsqccgi rsqcrcgi rsqdcgi rsqvcgi rspcgi rspccgi
cd /usr/share/gnuspool
chown -R gnuspool:daemon .
cd $origdir
}
case "$1" in
configure)
fixperms
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
# Automatically added by dh_installinit
if [ -x "/etc/init.d/gnuspool" ]; then
update-rc.d gnuspool defaults >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d gnuspool start || exit $?
else
/etc/init.d/gnuspool start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_installmenu
if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
update-menus
fi
# End automatically added section
# Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
ldconfig
fi
# End automatically added section
exit 0
|