Commit 6e53e059 authored by Maxime Ripard's avatar Maxime Ripard Committed by Peter Korsgaard
Browse files

package: add rsyslog



Rsyslog is a powerful and flexible syslog daemon.

[Peter: whitespace, rename initscript, allow platform override of conf file]
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 348e07c8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -496,6 +496,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/module-init-tools/Config.in"
source "package/procps/Config.in"
source "package/psmisc/Config.in"
source "package/rsyslog/Config.in"
source "package/sysklogd/Config.in"
source "package/sysvinit/Config.in"
source "package/util-linux/Config.in"
+6 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_RSYSLOG
	bool "rsyslog"
	help
	  Rsyslog is a powerful and flexible syslog implementation

	  http://www.rsyslog.com
+38 −0
Original line number Diff line number Diff line
#!/bin/sh
#
# Starts rsyslog.
#

start() {
	echo -n "Starting rsyslog daemon: "
	umask 077
	start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
	echo "OK"
}
stop() {
	echo -n "Stopping rsyslog daemon: "
	start-stop-daemon -K -q -p /var/run/rsyslogd.pid
	echo "OK"
}
restart() {
	stop
	start
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  *)
	echo $"Usage: $0 {start|stop|restart}"
	exit 1
esac

exit $?
+26 −0
Original line number Diff line number Diff line
#############################################################
#
# rsyslog
#
#############################################################
RSYSLOG_VERSION = 5.8.0
RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog/
RSYSLOG_DEPENDENCIES = zlib

# Build after Busybox
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
	RSYSLOG_DEPENDENCIES += busybox
endif

define RSYSLOG_INSTALL_CONF_SCRIPT
	$(INSTALL) -m 0755 -D package/rsyslog/S01rsyslog \
		$(TARGET_DIR)/etc/init.d/S01rsyslog
	[ -f $(TARGET_DIR)/etc/rsyslog.conf ] || \
		$(INSTALL) -m 0644 -D $(@D)/rsyslog.conf \
			$(TARGET_DIR)/etc/rsyslog.conf
	mkdir -p $(TARGET_DIR)/etc/rsyslog.d
endef

RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF_SCRIPT

$(eval $(call AUTOTARGETS,package,rsyslog))