~ubuntu-branches/ubuntu/lucid/rsyslog/lucid

« back to all changes in this revision

Viewing changes to debian/rsyslog.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Loïc Minier
  • Date: 2009-07-20 14:30:14 UTC
  • Revision ID: james.westby@ubuntu.com-20090720143014-b7q9g34v7uy88nbt
Tags: 4.2.0-1ubuntu2
* Prefix Vcs-* fields with "XSBC-Original-" as we don't use git for the
  Ubuntu packages.
* Strip local from rsyslog's postinst as it shouldn't be used outside of
  functions; LP: #401060.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
                done
68
68
        fi
69
69
 
70
 
        local user_conf=/etc/rsyslog.d/50-default.conf
71
 
        local default_conf=/usr/share/rsyslog/50-default.conf
 
70
        user_conf=/etc/rsyslog.d/50-default.conf
 
71
        default_conf=/usr/share/rsyslog/50-default.conf
72
72
 
73
73
        # Upgrade handling for config file.  We copy syslog.conf if it exists and
74
74
        # is modified, else use our default fresh-install config.
75
75
        if dpkg --compare-versions "$2" lt "3.22.0-1ubuntu1"; then
76
 
                local pkg_name=sysklogd
77
 
                local old_conf=/etc/syslog.conf
 
76
                pkg_name=sysklogd
 
77
                old_conf=/etc/syslog.conf
78
78
                if [ -e $old_conf ]; then
79
 
                        local md5sum="`md5sum \"$old_conf\" | sed -e \"s/ .*//\"`"
80
 
                        local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkg_name | \
 
79
                        md5sum="`md5sum \"$old_conf\" | sed -e \"s/ .*//\"`"
 
80
                        old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkg_name | \
81
81
                          sed -n -e "\' $old_conf ' { s/ obsolete$//; s/.* //; p }")"
82
82
                        if [ "$md5sum" != "$old_md5sum" ]; then
83
83
                                cp -n $old_conf $user_conf