Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 77e77bd629d21d35ea764fb312ce28fd > scriptlet

squirrelmail-1.4.22-15.1.mga6.noarch.rpm

POSTIN

/bin/sh
# Put correct hostname in config. We do this every time, since we change the
# .rpmnew as well. This is safe even if someone already modified the config,
# because the script will not find __HOSTNAME__ in the file and will do
# nothing.
for f in /etc/squirrelmail/config.php /etc/squirrelmail/config.php.rpmnew \
    /etc/squirrelmail/plugins/avelsieve_config.php /var/www/squirrelmail/plugins/avelsieve/addrule_html.php; do
    perl -pi -e "s|__HOSTNAME__|$HOSTNAME|g" $f 2>/dev/null
done

# Upgrade the configuration file using ccp if needed
# --ifexists makes sure it doesn't do anything (or whine/return nonzero)
# --ignoreopt config_version makes sure the config_version in config.php.rpmnew is kept
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/config.php --newfile /etc/squirrelmail/config.php.rpmnew

# try to fix the plugins config too
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/avelsieve_config.php --newfile /etc/squirrelmail/plugins/avelsieve_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/change_ldappass_config.php --newfile /etc/squirrelmail/plugins/change_ldappass_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/change_pass_config.php --newfile /etc/squirrelmail/plugins/change_pass_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/empty_folders_config.php --newfile /etc/squirrelmail/plugins/empty_folders_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/ldifimport_config.php --newfile /etc/squirrelmail/plugins/ldifimport_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/check_quota_config.php --newfile /etc/squirrelmail/plugins/check_quota_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/secure_login_config.php --newfile /etc/squirrelmail/plugins/secure_login_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/select_range_config.php --newfile /etc/squirrelmail/plugins/select_range_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/spamassassin_config.php --newfile /etc/squirrelmail/plugins/spamassassin_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/spam_buttons_config.php --newfile /etc/squirrelmail/plugins/spam_buttons_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/sqspell_config.php --newfile /etc/squirrelmail/plugins/sqspell_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/username_config.php --newfile /etc/squirrelmail/plugins/username_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/junkfolder_config.php --newfile /etc/squirrelmail/plugins/junkfolder_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/abook_import_export_config.php --newfile /etc/squirrelmail/plugins/abook_import_export_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/javascript_libs_config.php --newfile /etc/squirrelmail/plugins/javascript_libs_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/yubikey_config.php --newfile /etc/squirrelmail/plugins/yubikey_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/yubikey_glogal_config.php --newfile /etc/squirrelmail/plugins/yubikey_glogal_config.php.rpmnew
ccp --delete --ifexists --set "NoOrphans" --ignoreopt config_version --oldfile /etc/squirrelmail/plugins/mail_fetch_config.php --newfile /etc/squirrelmail/plugins/mail_fetch_config.php.rpmnew