File: nslcd.preinst

package info (click to toggle)
nss-pam-ldapd 0.9.4-3%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 5,824 kB
  • ctags: 2,121
  • sloc: ansic: 15,772; sh: 6,268; python: 3,264; xml: 1,802; makefile: 283; exp: 146
file content (26 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (4)
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
#!/bin/sh

set -e

# when upgrading from an pre-0.9 version of the package check for running
# screensavers that could lock users out when nslcd is replaced
# (the NSS and PAM modules loaded will not be able to communicate with the
# new nslcd)
if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt-nl "0.9"
then
  # perhaps only do check if ldap is enabled in NSS and/or PAM stack
  if pidof xscreensaver xlockmore > /dev/null
  then
    # source debconf library
    . /usr/share/debconf/confmodule
    # show note
    db_version 2.0
    db_reset nslcd/disable-screensaver
    db_input critical nslcd/disable-screensaver || true
    db_go || true
  fi
fi

#DEBHELPER#

exit 0