mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-04 01:07:17 +08:00
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
# Returns only the major and minor parts of a version number
|
|
major_minor() {
|
|
echo $(expr "$1" : '\([^\.]*\.[^\.]*\)')
|
|
}
|
|
|
|
post_upgrade() {
|
|
# We use http.http from now on. Change introduced in 0.98.1-2.
|
|
if [ $(vercmp 0.98.1-2 $2) -gt 0 ]; then
|
|
echo -n ">>> Removing cherokee system user and group... "
|
|
userdel cherokee &>/dev/null
|
|
groupdel cherokee &>/dev/null
|
|
echo "done."
|
|
fi
|
|
|
|
# Prior to 0.99.13-1, the logrotate file was installed with 755 permissions
|
|
if [ $(vercmp 0.99.13-1 $2) -gt 0 ]; then
|
|
chmod -x etc/logrotate.d/cherokee
|
|
fi
|
|
|
|
# 0.99.27 needs a tiny change in the configuration file
|
|
if [ $(vercmp 0.99.27-1 $2) -gt 0 ]; then
|
|
cat << EOM
|
|
|
|
==> Small change in /etc/cherokee.conf is required
|
|
|
|
Cherokee 0.99.27 fixes a bug that affected the I/O-cache subsystem. This
|
|
introduced a minor, harmless regression. To avoid getting the following
|
|
error:
|
|
|
|
(error) icons.c:184 - Duped suffix (case insensitive) 'z', pointing
|
|
to 'package.png'
|
|
|
|
you need to open up /etc/cherokee.conf in a text editor and locate the line
|
|
starting with "icons!suffix!package.png". From this line, you should remove
|
|
the "z" extension.
|
|
|
|
More information at:
|
|
|
|
http://lists.octality.com/pipermail/cherokee/2009-November/011684.html
|
|
http://svn.cherokee-project.com/changeset/3777
|
|
|
|
EOM
|
|
fi
|
|
|
|
# If upgrading from an earlier version, the configuration file
|
|
# may need to be converted
|
|
if [ $(vercmp $(major_minor $1) $(major_minor $2)) -gt 0 ]; then
|
|
cat << EOM
|
|
|
|
==> Configuration conversion is possibly required
|
|
|
|
Since you're upgrading from an older version, you may need to
|
|
convert your configuration file (i.e. /etc/cherokee/cherokee.conf)
|
|
to be compatible with the new cherokee version.
|
|
|
|
Converters have been installed in /usr/share/cherokee/converters
|
|
|
|
EOM
|
|
fi
|
|
}
|