~kklimonda/transmission/lp.529318

« back to all changes in this revision

Viewing changes to debian/transmission-daemon.preinst

  • Committer: robert.ancell at gmail
  • Date: 2009-07-20 05:25:11 UTC
  • Revision ID: robert.ancell@gmail.com-20090720052511-trnk90dbvz572f6z
initial transmission import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
test $DEBIAN_SCRIPT_DEBUG && set -v -x
 
6
 
 
7
case "$1" in
 
8
  configure|upgrade)
 
9
    # Workaround for conffile messup pre-1.40-5.
 
10
    # The explicit readlink comparison is necessary because of yet 
 
11
    # another error on my part (forgot the "info" subdir on 1.40-4).
 
12
    # costela - 2008-12-15
 
13
    LIB_SETTINGS=/var/lib/transmission-daemon/info/settings.json
 
14
    ETC_SETTINGS=/etc/transmission-daemon/settings.json
 
15
    if [ -f $LIB_SETTINGS -a -L $ETC_SETTINGS -a \( $LIB_SETTINGS -ef $ETC_SETTINGS -o "$(readlink $ETC_SETTINGS)" = "/var/lib/transmission-daemon/settings.json" \) ]; then
 
16
      rm $ETC_SETTINGS
 
17
      cp -pf $LIB_SETTINGS $ETC_SETTINGS
 
18
    fi
 
19
  ;;
 
20
esac
 
21
 
 
22
#DEBHELPER#
 
23
 
 
24
exit 0;