Added vsftpd upgrade function.
authorValentin Vidic <vvidic@carnet.hr>
Wed, 12 Mar 2008 14:50:05 +0000 (15:50 +0100)
committerValentin Vidic <vvidic@carnet.hr>
Wed, 12 Mar 2008 14:50:05 +0000 (15:50 +0100)
src/actions/main.queue
src/functions.sh

index e2fe134..434219e 100644 (file)
@@ -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
index 27c6133..9d35ceb 100644 (file)
@@ -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