2
2
# postinst script for rssh
4
# see: dh_installdeb(1)
10
. /usr/share/debconf/confmodule
20
abort-upgrade|abort-remove|abort-deconfigure)
25
echo "postinst called with unknown argument \`$1'" >&2
30
[ -e /usr/share/debconf/confmodule ] && {
31
db_get rssh/chroot_helper_setuid
35
if [ ! -x /usr/sbin/dpkg-statoverride ] || \
36
! dpkg-statoverride --list /usr/lib/rssh/rssh_chroot_helper >/dev/null ; then
37
if [ "$setuid" = "true" ] ; then
38
chmod 4755 /usr/lib/rssh/rssh_chroot_helper
39
elif [ "$setuid" = "false" ] ; then
40
chmod 0755 /usr/lib/rssh/rssh_chroot_helper
44
#db_get rssh/update-config-pre-2.2
46
#if [ x"$upgrade" = "xtrue" ]; then
53
if [ -x /usr/sbin/add-shell ]; then
54
/usr/sbin/add-shell /usr/bin/rssh
6
# Path to the helper program, which we may make setuid.
7
helper=/usr/lib/rssh/rssh_chroot_helper
9
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
10
. /usr/share/debconf/confmodule
11
db_get rssh/chroot_helper_setuid
15
# We don't want to change the setuid status if the sysadmin has overridden
16
# it with dpkg-statoverride.
17
if dpkg-statoverride --list "$helper" > /dev/null ; then
22
if [ "$status" != 0 ] ; then
23
if [ "$setuid" = "true" ] ; then
30
# Older versions of rssh incorrectly added rssh to /etc/shells. We don't
31
# want that. Remove it from /etc/shells to clean up after older
32
# packages. See Bug#424672.
33
if [ -n "$2" ] && dpkg --compare-versions "$2" lt 2.3.2-5 ; then
34
remove-shell /usr/bin/rssh