From 5aae55b00e9d4d3ee608df184b4253dab7a52783 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Wed, 12 Mar 2008 15:50:05 +0100 Subject: [PATCH] Added vsftpd upgrade function. --- src/actions/main.queue | 1 + src/functions.sh | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/actions/main.queue b/src/actions/main.queue index e2fe134..434219e 100644 --- a/src/actions/main.queue +++ b/src/actions/main.queue @@ -29,6 +29,7 @@ pkg dovecot-cn upgrade_dovecot pkg postfix-cn pkgadd postfix-cn pkg postgrey pkgrm postgrey # problematican pkg openldap-aai upgrade_openldap +true upgrade_vsftpd true upgrade first # neki paketi moraju rucno true upgrade second # neke pakete zelimo ranije true dist_upgrade # instaliraj ostatak diff --git a/src/functions.sh b/src/functions.sh index 27c6133..9d35ceb 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -539,6 +539,7 @@ restore_configs () { do config_backup=$config.$backup_ext if [ -e $config -a ! -e $config_backup ]; then + log "Saving config file $config" cp -av $config $config_backup ucf $config_backup $config fi @@ -706,6 +707,16 @@ upgrade_dovecot () { fi } +# vsftpd.postinst tries to start vsftpd so make sure it is not running +upgrade_vsftpd () { + if [ -x /etc/init.d/vsftpd ]; then + /etc/init.d/vsftpd stop || true + fi + + pkg vsftpd && pkgadd vsftpd + pkg vsftpd-cn && pkgadd vsftpd-cn +} + # fix /etc/dpkg/dpkg.cfg comment_force_overwrite () { if [ -f /etc/dpkg/dpkg.cfg ]; then -- 1.7.10.4