Project

General

Profile

Actions

Bug #2019

closed

RedHat 5 initscript condrestart not working

Added by Frederik Nosi over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Packaging
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

I noticed that a day after foreman has been started the log file gets deleted and not replaced. Torned out the logrotate script was rotatinng the log correctly and then calling the initscript with condrestart:

file /etc/logrotate.d/foreman:
[...]
postrotate
[ -e /etc/init.d/foreman ] && /etc/init.d/foreman condrestart >/dev/null 2>&1 || true
[...]

but condrestart wasn't working as expected. This fixes it for me:

  1. diff u /root/foreman /etc/init.d/foreman
    --
    /root/foreman 2012-12-06 13:10:47.000000000 0100
    ++ /etc/init.d/foreman 2012-12-06 13:11:06.000000000 0100
    @ -134,7 +134,7 @
    ;;
    condrestart)
    if [ f ${FOREMAN_HOME}/tmp/pids/server.pid ]; then
    restart
    /etc/init.d/foreman restart
    RETVAL=$?
    fi
    ;;
Actions #1

Updated by Dominic Cleal over 11 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

Thanks for the report and patch. I've gone a bit further and submitted this: https://github.com/theforeman/foreman-rpms/pull/19

Actions #2

Updated by Dominic Cleal over 11 years ago

  • Status changed from Assigned to Ready For Testing
Actions #3

Updated by Dominic Cleal about 11 years ago

  • Status changed from Ready For Testing to Resolved
  • Target version set to 1.1
Actions

Also available in: Atom PDF