Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-16613

macOS pkg installer may left unnecessary files in case of reinstalling/upgrading

XMLWordPrintable

    • Team A
    • Sprint 56 (Sep 2019), Sprint 57 (Oct 2019), Sprint 58 (Nov 2019)
    • 0.25

      Steps to reproduce:

      1. Install zabbix-agent via pkg
      2. Modify file `/usr/local/etc/zabbix/zabbix_agentd.conf`
      3. Re-install zabbix agent via pkg

      Result:

      Extra unnecessary files will be left by second installer: `/usr/local/etc/zabbix/zabbix_agentd/userparameter_{examples,mysql}.conf.NEW` while their  counterparts (without '.NEW' suffix is identical to them)

      Expected:
      No such files

       

      How to Fix:

      Replace line 37 of postinstall scripts (`cmp --silent "${file_new}" "${file}" || ret=$?`) with `cmp --silent "${file_new}" "${file}"; ret=$?`

      What happens is `ret` variable reused in cycle and not set to zero on next loop.

            viktors.tjarve Viktors Tjarve
            vladrassokhin Vladislav Rassokhin
            Team A
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: