kumquat-buildroot/package/sysklogd/sysklogd.mk
Carlos Santos b3c76a435b sysklogd: rewrite init script
- Split it into S01syslogd and S02klogd to make every init script be
  called the same as the executable it starts.
- Implement start, stop, restart and reload as functions, like in other
  init scripts, using start-stop-daemon.
- Indent with tabs, not spaces.
- Detect and report start/stop errors (previous version ignored them and
  always reported OK).
- Support /etc/default/$DAEMON configuration files.
- Do not kill syslogd in "reload". Send a SIGHUP signal, instructing it
  to perform a re-initialization.
- Do not kill klogd in "reload". Send a signal (default 0, which does
  nothing).  Users can configure this signal in /etc/default/klogd to
  either SIGUSR1 or SIGUSR2.

Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Reviewed-by: Matt Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-12-10 22:15:51 +01:00

45 lines
1.5 KiB
Makefile

################################################################################
#
# sysklogd
#
################################################################################
SYSKLOGD_VERSION = 1.5.1
SYSKLOGD_SITE = http://www.infodrom.org/projects/sysklogd/download
SYSKLOGD_LICENSE = GPL-2.0+
SYSKLOGD_LICENSE_FILES = COPYING
# Override SKFLAGS which is used as CFLAGS.
define SYSKLOGD_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) SKFLAGS="$(TARGET_CFLAGS) -DSYSV" \
-C $(@D)
endef
define SYSKLOGD_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0500 $(@D)/syslogd $(TARGET_DIR)/sbin/syslogd
$(INSTALL) -D -m 0500 $(@D)/klogd $(TARGET_DIR)/sbin/klogd
$(INSTALL) -D -m 0644 package/sysklogd/syslog.conf \
$(TARGET_DIR)/etc/syslog.conf
endef
define SYSKLOGD_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/sysklogd/S01syslogd \
$(TARGET_DIR)/etc/init.d/S01syslogd
$(INSTALL) -m 755 -D package/sysklogd/S02klogd \
$(TARGET_DIR)/etc/init.d/S02klogd
endef
define SYSKLOGD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \
$(TARGET_DIR)/usr/lib/systemd/system/syslogd.service
$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/klogd.service \
$(TARGET_DIR)/usr/lib/systemd/system/klogd.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf ../../../../usr/lib/systemd/system/syslogd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslogd.service
ln -sf ../../../usr/lib/systemd/system/syslogd.service \
$(TARGET_DIR)/etc/systemd/system/syslog.service
endef
$(eval $(generic-package))