ACCC1380 commited on
Commit
4697550
1 Parent(s): 5ec6de0

Upload var/lib/dpkg/info/procps.postinst with huggingface_hub

Browse files
Files changed (1) hide show
  1. var/lib/dpkg/info/procps.postinst +119 -0
var/lib/dpkg/info/procps.postinst ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+ # postinst script for procps
3
+ #
4
+ # see: dh_installdeb(1)
5
+
6
+ set -e
7
+
8
+ # summary of how this script can be called:
9
+ # * <postinst> `configure' <most-recently-configured-version>
10
+ # * <old-postinst> `abort-upgrade' <new version>
11
+ # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12
+ # <new-version>
13
+ # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14
+ # <failed-install-package> <version> `removing'
15
+ # <conflicting-package> <version>
16
+ # for details, see http://www.debian.org/doc/debian-policy/ or
17
+ # the debian-policy package
18
+ #
19
+ # quoting from the policy:
20
+ # Any necessary prompting should almost always be confined to the
21
+ # post-installation script, and should be protected with a conditional
22
+ # so that unnecessary prompting doesn't happen if a package's
23
+ # installation fails and the `postinst' is called with `abort-upgrade',
24
+ # `abort-remove' or `abort-deconfigure'.
25
+
26
+ # Move a conffile without triggering a dpkg question
27
+ mv_conffile() {
28
+ OLDCONFFILE="$1"
29
+ NEWCONFFILE="$2"
30
+
31
+ if [ -e "$OLDCONFFILE" ]; then
32
+ echo "Preserving user changes to $NEWCONFFILE ..."
33
+ mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
34
+ mv -f "$OLDCONFFILE" "$NEWCONFFILE"
35
+ fi
36
+ }
37
+
38
+ # update alternative, if it exists
39
+ check_alternatives() {
40
+ BINNAME="$1"
41
+ BINPATH="$2"
42
+ MANSEC="$3"
43
+ if [ -e "$BINPATH"/"$BINNAME".procps ] ; then
44
+ update-alternatives --install "$BINPATH"/"$BINNAME" "$BINNAME" \
45
+ "$BINPATH"/"$BINNAME".procps 50 \
46
+ --slave /usr/share/man/man"$MANSEC"/"$BINNAME"."$MANSEC".gz "$BINNAME"."$MANSEC".gz \
47
+ /usr/share/man/man"$MANSEC"/"$BINNAME".procps."$MANSEC".gz
48
+ fi
49
+ }
50
+ case "$1" in
51
+ configure|abort-remove|abort-deconfigure)
52
+ if [ -e /etc/psdevtab ] ; then
53
+ rm -f /etc/psdevtab
54
+ fi
55
+ if [ -e /etc/psdatabase ]
56
+ then
57
+ rm -f /etc/psdatabase
58
+ fi
59
+ # Remove old procps init.d script, if it exists Closes: #55137
60
+ if [ -L /etc/rcS.d/S30procps.sh ]
61
+ then
62
+ update-rc.d -f procps.sh remove >/dev/null
63
+ fi
64
+ # and if that didn't work Closes: #92184 (#234306 with -L )
65
+ if [ -L /etc/rcS.d/S30procps.sh ]
66
+ then
67
+ rm -f /etc/rcS.d/S30procps.sh
68
+ fi
69
+ # Remove moved procps.sh file, if it is there
70
+ if dpkg --compare-versions "$2" le "1:3.2.7-3"; then
71
+ mv_conffile "/etc/init.d/procps.sh" "/etc/init.d/procps"
72
+ fi
73
+
74
+ #
75
+ # Now to do the alternatives for w
76
+ update-alternatives --install /usr/bin/w w /usr/bin/w.procps 50 \
77
+ --slave /usr/share/man/man1/w.1.gz w.1.gz /usr/share/man/man1/w.procps.1.gz
78
+ # Do alternatives for uptime kill vmstat and ps, if required
79
+ check_alternatives "uptime" "/usr/bin" "1"
80
+ check_alternatives "kill" "/usr/bin" "1"
81
+ check_alternatives "vmstat" "/usr/bin" "8"
82
+ check_alternatives "ps" "/bin" "1"
83
+
84
+ ;;
85
+
86
+ abort-upgrade)
87
+ # Nothing to do
88
+ ;;
89
+
90
+ *)
91
+ echo "postinst called with unknown argument \`$1'" >&2
92
+ exit 1
93
+ ;;
94
+ esac
95
+
96
+ # dh_installdeb will replace this with shell code automatically
97
+ # generated by other debhelper scripts.
98
+
99
+ # Automatically added by dh_installmenu/12.10ubuntu1
100
+ if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
101
+ update-menus
102
+ fi
103
+ # End automatically added section
104
+ # Automatically added by dh_installdeb/12.10ubuntu1
105
+ dpkg-maintscript-helper rm_conffile /etc/sysctl.d/protect-links.conf 2:3.3.16-1ubuntu1\~ -- "$@"
106
+ dpkg-maintscript-helper rm_conffile /etc/sysctl.d/10-link-restrictions.conf 2:3.3.16-1ubuntu1\~ -- "$@"
107
+ # End automatically added section
108
+ # Automatically added by dh_installinit/12.10ubuntu1
109
+ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
110
+ if [ -x "/etc/init.d/procps" ]; then
111
+ update-rc.d procps defaults >/dev/null || exit 1
112
+ fi
113
+ fi
114
+ # End automatically added section
115
+
116
+
117
+ exit 0
118
+
119
+