Revision 24668,
1.6 KB
checked in by broder, 14 years ago
(diff) |
In cluster-login-config:
* Replace /sbin/getty instead of diverting the tty jobs.
* Use ConsoleKit to activate the user's session instead of telling them
to press a key combo. (Trac: #547)
|
Rev | Line | |
---|
[24668] | 1 | #!/bin/sh |
---|
| 2 | # preinst script for debathena-cluster-login-config |
---|
| 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 | rm_conffile() { |
---|
| 17 | local PKGNAME="$1" |
---|
| 18 | local CONFFILE="$2" |
---|
| 19 | |
---|
| 20 | [ -e "$CONFFILE" ] || return 0 |
---|
| 21 | |
---|
| 22 | local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" |
---|
| 23 | local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ |
---|
| 24 | sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" |
---|
| 25 | # ' # <-- emacs is confused about quoting |
---|
| 26 | if [ "$md5sum" != "$old_md5sum" ]; then |
---|
| 27 | echo "Obsolete conffile $CONFFILE has been modified by you." |
---|
| 28 | echo "Saving as $CONFFILE.dpkg-bak ..." |
---|
| 29 | mv -f "$CONFFILE" "$CONFFILE".dpkg-bak |
---|
| 30 | else |
---|
| 31 | echo "Removing obsolete conffile $CONFFILE ..." |
---|
| 32 | mv -f "$CONFFILE" "$CONFFILE".dpkg-del |
---|
| 33 | fi |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | case "$1" in |
---|
| 37 | install|upgrade) |
---|
| 38 | if dpkg --compare-versions "$2" lt 1.24~; then |
---|
| 39 | rm_conffile debathena-cluster-login-config "/etc/event.d/ttymsg" |
---|
| 40 | rm_conffile debathena-cluster-login-config "/etc/init/ttymsg.conf" |
---|
| 41 | fi |
---|
| 42 | ;; |
---|
| 43 | |
---|
| 44 | abort-upgrade) |
---|
| 45 | ;; |
---|
| 46 | |
---|
| 47 | *) |
---|
| 48 | echo "preinst called with unknown argument \`$1'" >&2 |
---|
| 49 | exit 1 |
---|
| 50 | ;; |
---|
| 51 | esac |
---|
| 52 | |
---|
| 53 | # dh_installdeb will replace this with shell code automatically |
---|
| 54 | # generated by other debhelper scripts. |
---|
| 55 | |
---|
| 56 | #DEBHELPER# |
---|
| 57 | |
---|
| 58 | exit 0 |
---|
| 59 | |
---|
| 60 | |
---|
Note: See
TracBrowser
for help on using the repository browser.