Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 5.5.35
    • Fix versions: 5.5.36
    • Components: None
    • Labels:
    • Sprint:

      Description

      We use the following postun scriptlet:

      if [ $1 -ge 1 ]; then
        if [ -x %{_sysconfdir}/init.d/mysql ] ; then
          # only restart the server if it was alredy running
          %{_sysconfdir}/init.d/mysql status > /dev/null 2>&1 && \
          %{_sysconfdir}/init.d/mysql restart
        fi
      fi
      

      The problem is that A && B construct, while it only runs B if A succeeds, it also sets the exit code to that of A, if A fails.

      That is, if mysql status fails, the scriptlet exists with a non-zero code, and rpm treats it as a failure.

      Possible fix: use if A; then B; fi instead of A && B.

        Attachments

          Activity

            People

            • Assignee:
              serg Sergei Golubchik
              Reporter:
              serg Sergei Golubchik
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: