X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Ffunctions.sh;h=9d35ceb70a500c970d08a334169bb5b8beb4d6d5;hb=5aae55b00e9d4d3ee608df184b4253dab7a52783;hp=22ba7a6346d640a86e3b9dda127d12de9fb9f98d;hpb=45c30989728af6d256fe40cbb16ebdbd672b5bc5;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index 22ba7a6..9d35ceb 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -229,8 +229,8 @@ run_actions() { check=$(echo "$line" | sed 's/ */ /g'| awk -F' ' '{print $1}') action=$(echo "$line" | sed 's/ */ /g'| awk -F' ' '{print $2}') checkmsg="" - [ "$test" != "true" ] && checkmsg="if '$test'" - if eval $test; then + [ "$check" != "true" ] && checkmsg="if '$check'" + if eval $check; then log "$(printf 'action %02d' $lineno) starting: '${action}' $checkmsg " eval $action log "$(printf 'action %02d' $lineno) finished: '${action}' $checkmsg" @@ -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