File: cracklib-runtime.postinst

package info (click to toggle)
cracklib2 2.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,148 kB
  • ctags: 411
  • sloc: sh: 11,875; ansic: 2,632; xml: 365; python: 288; makefile: 207; sed: 16
file content (30 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (9)
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
#! /bin/sh

set -e

run_update_cracklib () {
    if [ -r /etc/cracklib/cracklib.conf ]; then
        update-cracklib > /dev/null
    fi
}

if [ "$1" = "triggered" ]; then
    run_update_cracklib
    exit 0
fi

[ "$1" = "configure" ] || exit 0

run_update_cracklib

# /etc/cron.daily/cracklib -> cracklib-runtime transition
if dpkg --compare-versions "$2" le "2.7-17"; then
    if [ -e /etc/cron.daily/cracklib ]; then
        rm -f /etc/cron.daily/cracklib-runtime
        mv /etc/cron.daily/cracklib /etc/cron.daily/cracklib-runtime
    fi
fi

#DEBHELPER#

exit 0