From: Valentin Vidic Date: Wed, 12 Mar 2008 14:50:05 +0000 (+0100) Subject: Added vsftpd upgrade function. X-Git-Tag: debian/4.0.1~23 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=5aae55b00e9d4d3ee608df184b4253dab7a52783;p=carnet-upgrade.git Added vsftpd upgrade function. --- 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