postinst is in fs2ram 0.3.10.
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | #!/bin/sh
# postinst script for fs2ram
#
# see: dh_installdeb(1)
set -e
. /usr/share/debconf/confmodule
set_perms() {
USER=$1
GROUP=$2
MODE=$3
FILE=$4
if ! dpkg-statoverride --list $FILE > /dev/null 2>&1; then
chown $USER:$GROUP $FILE
chmod $MODE $FILE
fi
}
case "$1" in
configure)
if [ "$2" = "" ]; then
# Fresh installation
fs2ram execute-unmount-script -a || true
else
if $(dpkg --compare-versions $2 lt 0.3.7); then
if [ -f '/etc/fs2ram.conf' ]; then
echo "Moving the default configuration file to /etc/fs2ram/fs2ram.conf."
mv -f /etc/fs2ram.conf /etc/fs2ram/fs2ram.conf
fi
fi
fi
# Fix some permissions
set_perms root root 700 /var/lib/fs2ram/mount-scripts
set_perms root root 700 /etc/fs2ram/unmount-scripts
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
db_stop
# Automatically added by dh_installinit
if [ -x "/etc/init.d/fs2ram" ]; then
update-rc.d fs2ram start 36 S . start 39 0 6 . >/dev/null || exit $?
fi
# End automatically added section
exit 0
|