diff options
author | Michael Biebl <biebl@debian.org> | 2012-10-23 01:03:24 +0200 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2012-10-23 01:03:24 +0200 |
commit | 4a7e552d0b90a8cd2f494c0ee77f469596f591a0 (patch) | |
tree | b17f42c5469876dad99079339589bce2eecf1bdb | |
parent | 0ccb8d3d626674d4387e9bdae7cf25182a5a24f9 (diff) | |
download | rsyslog-4a7e552d0b90a8cd2f494c0ee77f469596f591a0.tar.gz |
Remove unnecessary duplication from the init script and also drop the -c compatibility mode option.
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/rsyslog.default | 1 | ||||
-rw-r--r-- | debian/rsyslog.init | 23 |
3 files changed, 8 insertions, 18 deletions
diff --git a/debian/changelog b/debian/changelog index 032207a..6da9dda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ rsyslog (7.2.0-1) UNRELEASED; urgency=low - No longer requires libgcrypt with newer GnuTLS versions. (Closes: #638658) * Track stable releases again. + * Remove unnecessary duplication from the init script and also drop the -c + compatibility mode option. -- Michael Biebl <biebl@debian.org> Tue, 23 Oct 2012 00:52:43 +0200 diff --git a/debian/rsyslog.default b/debian/rsyslog.default index 82a08d2..8ec3ea0 100644 --- a/debian/rsyslog.default +++ b/debian/rsyslog.default @@ -2,4 +2,3 @@ # -x disables DNS lookups for remote messages # See rsyslogd(8) for more details RSYSLOGD_OPTIONS="" - diff --git a/debian/rsyslog.init b/debian/rsyslog.init index 802fd61..0389df6 100644 --- a/debian/rsyslog.init +++ b/debian/rsyslog.init @@ -22,14 +22,13 @@ DESC="enhanced syslogd" NAME=rsyslog RSYSLOGD=rsyslogd -RSYSLOGD_BIN=/usr/sbin/rsyslogd -RSYSLOGD_OPTIONS="-c5" -RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid +DAEMON=/usr/sbin/rsyslogd +PIDFILE=/var/run/rsyslogd.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed -[ -x "$RSYSLOGD_BIN" ] || exit 0 +[ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME @@ -39,22 +38,15 @@ SCRIPTNAME=/etc/init.d/$NAME do_start() { - DAEMON="$RSYSLOGD_BIN" - DAEMON_ARGS="$RSYSLOGD_OPTIONS" - PIDFILE="$RSYSLOGD_PIDFILE" - # Return # 0 if daemon has been started # 1 if daemon was already running # other if daemon could not be started or a failure occured - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $RSYSLOGD_OPTIONS } do_stop() { - DAEMON="$RSYSLOGD_BIN" - PIDFILE="$RSYSLOGD_PIDFILE" - # Return # 0 if daemon has been stopped # 1 if daemon was already stopped @@ -66,9 +58,6 @@ do_stop() # Tell rsyslogd to close all open files # do_rotate() { - DAEMON="$RSYSLOGD_BIN" - PIDFILE="$RSYSLOGD_PIDFILE" - start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --exec $DAEMON } @@ -88,7 +77,7 @@ create_xconsole() { sendsigs_omit() { OMITDIR=/run/sendsigs.omit.d mkdir -p $OMITDIR - ln -sf $RSYSLOGD_PIDFILE $OMITDIR/rsyslog + ln -sf $PIDFILE $OMITDIR/rsyslog } case "$1" in @@ -126,7 +115,7 @@ case "$1" in $0 start ;; status) - status_of_proc -p $RSYSLOGD_PIDFILE $RSYSLOGD_BIN $RSYSLOGD && exit 0 || exit $? + status_of_proc -p $PIDFILE $DAEMON $RSYSLOGD && exit 0 || exit $? ;; *) echo "Usage: $SCRIPTNAME {start|stop|rotate|restart|force-reload|status}" >&2 |