~arges/ubuntu/quantal/rsyslog/fix-lp1059592

« back to all changes in this revision

Viewing changes to debian/rsyslog.init

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-05-30 18:40:12 UTC
  • mfrom: (1.3.9 upstream)
  • mto: (36.1.1 oneiric.merge)
  • mto: This revision was merged to the branch mainline in revision 37.
  • Revision ID: james.westby@ubuntu.com-20110530184012-ec03xid2c01hyizp
Tags: 5.8.1-1
* New upstream release.
* Bump Standards-Version to 3.9.2. No further changes.
* Enable and install impstats module. (Closes: #620114)
* Update logcheck rule. (Closes: #616659)
* debian/rsyslog.init: Set correct compat level (5).
* The way rsyslog processes SIGHUP has changed. It no longer does a reload
  of its configuration, but simply closes all open files. To apply a changed
  configuration, rsyslogd needs to be restarted now.
  - Drop "reload" action from debian/rsyslog.init, map "force-reload" to
    "restart". (Closes: #580897)
  - Add "rotate" action to debian/rsyslog.init which sends SIGHUP to
    rsyslogd. Use that in debian/rsyslog.logrotate. (Closes: #626365)
  - Update debian/rsyslog-mysql.postinst and rsyslog-pgsql.postinst to use
    restart instead of reload.
  - Add a NEWS file explaining the changed SIGHUP handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
RSYSLOGD=rsyslogd
25
25
RSYSLOGD_BIN=/usr/sbin/rsyslogd
26
 
RSYSLOGD_OPTIONS="-c4"
 
26
RSYSLOGD_OPTIONS="-c5"
27
27
RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid
28
28
 
29
29
SCRIPTNAME=/etc/init.d/$NAME
63
63
}
64
64
 
65
65
#
66
 
# Tell rsyslogd to reload its configuration
 
66
# Tell rsyslogd to close all open files
67
67
#
68
 
do_reload() {
 
68
do_rotate() {
69
69
        NAME="$RSYSLOGD"
70
70
        PIDFILE="$RSYSLOGD_PIDFILE"
71
71
 
117
117
        esac
118
118
 
119
119
        ;;
120
 
  reload|force-reload)
121
 
        log_daemon_msg "Reloading $DESC" "$RSYSLOGD"
122
 
        do_reload
 
120
  rotate)
 
121
        log_daemon_msg "Closing open files" "$RSYSLOGD"
 
122
        do_rotate
123
123
        log_end_msg $?
124
124
        ;;
125
 
  restart)
 
125
  restart|force-reload)
126
126
        $0 stop
127
127
        $0 start
128
128
        ;;
130
130
        status_of_proc -p $RSYSLOGD_PIDFILE $RSYSLOGD_BIN $RSYSLOGD && exit 0 || exit $?
131
131
        ;;
132
132
  *)
133
 
        echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2
 
133
        echo "Usage: $SCRIPTNAME {start|stop|rotate|restart|force-reload|status}" >&2
134
134
        exit 3
135
135
        ;;
136
136
esac