preinst is in cobbler 2.2.2-0ubuntu33.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
# Fix world-readable permissions on /etc/cobbler/users.digest if upgrading
# from a version which had it set incorrectly by default, the file is still
# there and still has the original incorrect permissions (LP: #858860).
if [ "$1" = "upgrade" ] \
&& dpkg --compare-versions "$2" lt "2.2.2-0ubuntu14" \
&& [ -f /etc/cobbler/users.digest \
-a `stat -c%a /etc/cobbler/users.digest` = "644" ]; then
chmod 600 /etc/cobbler/users.digest
fi
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/cobbler" ] && [ ! -L "/etc/init.d/cobbler" ]; then
if [ "`md5sum \"/etc/init.d/cobbler\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' cobbler | sed -n -e \"\\\\' /etc/init.d/cobbler '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/cobbler has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/cobbler" "/etc/init.d/cobbler.dpkg-bak"
else
rm -f "/etc/init.d/cobbler"
fi
fi
fi
# End automatically added section
|