ACCC1380 commited on
Commit
b46bedc
1 Parent(s): dcafb7c

Upload var/lib/dpkg/info/libpam-runtime.postinst with huggingface_hub

Browse files
var/lib/dpkg/info/libpam-runtime.postinst ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh -e
2
+
3
+ . /usr/share/debconf/confmodule
4
+
5
+ calculate_md5sum()
6
+ {
7
+ configfile="$1"
8
+ sed -n -e'1,/# here are the per-package modules (the "Primary" block)/p;
9
+ /# here.s the fallback if no module succeeds/,/# and here are more per-package modules (the "Additional" block)/p;
10
+ /# end of pam-auth-update config/,$p' \
11
+ /etc/pam.d/"$configfile" | md5sum | awk '{ print $1 }'
12
+ }
13
+
14
+ # If the user has removed the config file, respect this sign of dementia
15
+ # -- only create on package install.
16
+ force=
17
+ if [ -z "$2" ] || dpkg --compare-versions "$2" lt 1.0.1-11
18
+ then
19
+ force=--force
20
+ for configfile in common-auth common-account common-session \
21
+ common-password
22
+ do
23
+ if [ -f /etc/pam.d/$configfile ] && \
24
+ ! fgrep -q $(calculate_md5sum $configfile) \
25
+ /usr/share/pam/$configfile.md5sums 2>/dev/null
26
+ then
27
+ force=
28
+ fi
29
+ done
30
+ fi
31
+
32
+ pam-auth-update --package $force
33
+
34
+ if [ -n "$force" ]; then
35
+ rm -f /etc/pam.d/common-auth.pam-old \
36
+ /etc/pam.d/common-account.pam-old \
37
+ /etc/pam.d/common-password.pam-old \
38
+ /etc/pam.d/common-session.pam-old
39
+ elif dpkg --compare-versions "$2" lt-nl 1.1.0-1 \
40
+ && [ ! -e /etc/pam.d/common-session-noninteractive ]
41
+ then
42
+ cp -a /etc/pam.d/common-session /etc/pam.d/common-session-noninteractive
43
+ fi
44
+
45
+