Upload var/lib/dpkg/info/procps.preinst with huggingface_hub
Browse files
var/lib/dpkg/info/procps.preinst
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# preinst script for procps
|
| 3 |
+
#
|
| 4 |
+
# see: dh_installdeb(1)
|
| 5 |
+
|
| 6 |
+
set -e
|
| 7 |
+
|
| 8 |
+
# summary of how this script can be called:
|
| 9 |
+
# * <new-preinst> `install'
|
| 10 |
+
# * <new-preinst> `install' <old-version>
|
| 11 |
+
# * <new-preinst> `upgrade' <old-version>
|
| 12 |
+
# * <old-preinst> `abort-upgrade' <new-version>
|
| 13 |
+
# for details, see http://www.debian.org/doc/debian-policy/ or
|
| 14 |
+
# the debian-policy package
|
| 15 |
+
|
| 16 |
+
prep_mv_conffile()
|
| 17 |
+
{
|
| 18 |
+
PKGNAME=$1
|
| 19 |
+
CONFFILE=$2
|
| 20 |
+
|
| 21 |
+
if [ -e "$CONFFILE" ]; then
|
| 22 |
+
md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
|
| 23 |
+
old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE'{s/ obsolete$//;s/.* //p}\"`"
|
| 24 |
+
if [ "$md5sum" = "$old_md5sum" ]; then
|
| 25 |
+
rm -f "$CONFFILE"
|
| 26 |
+
fi
|
| 27 |
+
fi
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
upgradeoldconffile()
|
| 31 |
+
{
|
| 32 |
+
f=/etc/init.d/procps.sh
|
| 33 |
+
[ ! -e "$f" ] && return
|
| 34 |
+
|
| 35 |
+
curmd5=`md5sum "$f" |awk '{print $1}'`
|
| 36 |
+
oldmd5=`dpkg-query -W -f='${Conffiles}' procps | sed "{\\'^ $f ' ! d; s///}"`
|
| 37 |
+
[ "$curmd5" = "$oldmd5" ] && {
|
| 38 |
+
# The admin has not modified $f
|
| 39 |
+
echo "Preparing to remove obsolete, unmodified conffile: $f"
|
| 40 |
+
mv -fv "$f" "$f.from-preinst"
|
| 41 |
+
return
|
| 42 |
+
} >&2
|
| 43 |
+
|
| 44 |
+
# The admim modified $f; cause a deliberate conffile prompt
|
| 45 |
+
echo "Moving obsolete conffile to new pathname:"
|
| 46 |
+
mv -fv "$f" "${f%.sh}"
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
case "$1" in
|
| 51 |
+
install)
|
| 52 |
+
;;
|
| 53 |
+
upgrade)
|
| 54 |
+
prep_mv_conffile procps "/etc/init.d/procps.sh"
|
| 55 |
+
;;
|
| 56 |
+
abort-upgrade)
|
| 57 |
+
;;
|
| 58 |
+
|
| 59 |
+
*)
|
| 60 |
+
echo "preinst called with unknown argument \`$1'" >&2
|
| 61 |
+
exit 1
|
| 62 |
+
;;
|
| 63 |
+
esac
|
| 64 |
+
|
| 65 |
+
# dh_installdeb will replace this with shell code automatically
|
| 66 |
+
# generated by other debhelper scripts.
|
| 67 |
+
|
| 68 |
+
# Automatically added by dh_installdeb/12.10ubuntu1
|
| 69 |
+
dpkg-maintscript-helper rm_conffile /etc/sysctl.d/protect-links.conf 2:3.3.16-1ubuntu1\~ -- "$@"
|
| 70 |
+
dpkg-maintscript-helper rm_conffile /etc/sysctl.d/10-link-restrictions.conf 2:3.3.16-1ubuntu1\~ -- "$@"
|
| 71 |
+
# End automatically added section
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
exit 0
|
| 75 |
+
|
| 76 |
+
|