units: automatically generated syslog.target

This commit is contained in:
Lennart Poettering 2010-05-16 21:12:12 +02:00
parent 70449379de
commit a7b6f8e578
3 changed files with 31 additions and 22 deletions

View File

@ -80,11 +80,13 @@ dist_systemunit_DATA = \
systemunit_DATA = \
units/systemd-initctl.service \
units/systemd-logger.service
units/systemd-logger.service \
units/syslog.target
EXTRA_DIST = \
units/systemd-initctl.service.in \
units/systemd-logger.service.in \
units/syslog.target.in \
LICENSE \
README
@ -281,12 +283,18 @@ units/systemd-logger.service: units/systemd-logger.service.in Makefile
-e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \
< $< > $@
units/syslog.target: units/syslog.target.in Makefile
$(MKDIR_P) units
$(SED) -e 's,@SPECIAL_SYSLOG_SERVICE\@,$(SPECIAL_SYSLOG_SERVICE),g' \
< $< > $@
CLEANFILES = \
src/systemd-interfaces.c \
src/systemctl.c \
src/systemadm.c \
units/systemd-initctl.service \
units/systemd-logger.service
units/systemd-logger.service \
units/syslog.target
if HAVE_XSLTPROC
man/%.5: man/%.xml

View File

@ -164,43 +164,43 @@ case $with_distro in
fedora)
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
special_dbus_service=messagebus.service
special_syslog_service=rsyslog.service
SPECIAL_DBUS_SERVICE=messagebus.service
SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
;;
suse)
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc/init.d
special_dbus_service=dbus.service
special_syslog_service=syslog.service
SPECIAL_DBUS_SERVICE=dbus.service
SPECIAL_SYSLOG_SERVICE=syslog.service
AC_DEFINE(TARGET_SUSE, [], [Target is OpenSUSE/SLES])
;;
debian)
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc
special_dbus_service=dbus.service
special_syslog_service=rsyslog.service
SPECIAL_DBUS_SERVICE=dbus.service
SPECIAL_SYSLOG_SERVICE=rsyslog.service
AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian/Ubuntu])
;;
arch)
SYSTEM_SYSVINIT_PATH=/etc/rc.d
SYSTEM_SYSVRCND_PATH=/etc
special_dbus_service=dbus.service
special_syslog_service=syslog-ng.service
SPECIAL_DBUS_SERVICE=dbus.service
SPECIAL_SYSLOG_SERVICE=syslog-ng.service
AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
;;
gentoo)
SYSTEM_SYSVINIT_PATH=/etc/init.d
SYSTEM_SYSVRCND_PATH=/etc
special_dbus_service=dbus.service
special_syslog_service=syslog-ng.service
SPECIAL_DBUS_SERVICE=dbus.service
SPECIAL_SYSLOG_SERVICE=syslog-ng.service
AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
;;
slackware)
SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
SYSTEM_SYSVRCND_PATH=/etc/rc.d
special_dbus_service=messagebus.service
special_syslog_service=syslog.service
SPECIAL_DBUS_SERVICE=messagebus.service
SPECIAL_SYSLOG_SERVICE=syslog.service
AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
;;
other)
@ -233,17 +233,19 @@ AC_ARG_WITH([sysvrcd-path],
AC_ARG_WITH([dbus-service],
[AS_HELP_STRING([--with-dbus-service=PATH],
[Specify the name of the special DBus service @<:@default=based on distro@:>@])],
[special_dbus_service="$withval"],
[SPECIAL_DBUS_SERVICE="$withval"],
[])
AC_ARG_WITH([syslog-service],
[AS_HELP_STRING([--with-syslog-service=PATH],
[Specify the name of the special syslog service @<:@default=based on distro@:>@])],
[special_syslog_service="$withval"],
[SPECIAL_SYSLOG_SERVICE="$withval"],
[])
AC_SUBST(SYSTEM_SYSVINIT_PATH)
AC_SUBST(SYSTEM_SYSVRCND_PATH)
AC_SUBST(SPECIAL_DBUS_SERVICE)
AC_SUBST(SPECIAL_SYSLOG_SERVICE)
AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
@ -252,8 +254,8 @@ AM_CONDITIONAL(TARGET_ARCH, test x"$with_distro" = xarch)
AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
AC_DEFINE_UNQUOTED(SPECIAL_DBUS_SERVICE, ["$special_dbus_service"], [D-Bus service name])
AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$special_syslog_service"], [syslog service name])
AC_DEFINE_UNQUOTED(SPECIAL_DBUS_SERVICE, ["$SPECIAL_DBUS_SERVICE"], [D-Bus service name])
AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name])
AC_ARG_WITH([udevrulesdir],
AS_HELP_STRING([--with-udevrulesdir=DIR], [Diectory for udev rules]),
@ -261,7 +263,6 @@ AC_ARG_WITH([udevrulesdir],
[with_udevrulesdir=/lib/udev/rules.d])
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
AC_OUTPUT([Makefile])
echo "
@ -270,8 +271,8 @@ echo "
Distribution: ${with_distro}
SysV init scripts: ${SYSTEM_SYSVINIT_PATH}
SysV rc?.d directories: ${SYSTEM_SYSVRCND_PATH}
Syslog service: ${special_syslog_service}
D-Bus service: ${special_dbus_service}
Syslog service: ${SPECIAL_SYSLOG_SERVICE}
D-Bus service: ${SPECIAL_DBUS_SERVICE}
Gtk: ${have_gtk}
udev rules dir: ${with_udevrulesdir}
"

View File

@ -103,7 +103,7 @@ struct Watch {
#define SPECIAL_NETWORK_TARGET "network.target"
#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named */
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
#define SPECIAL_SYSLOG_TARGET "syslog.target" /* Should pull in syslog.socket or syslog.service */
#define SPECIAL_SYSLOG_TARGET "syslog.target" /* LSB's $syslog; Should pull in syslog.socket or syslog.service */
#define SPECIAL_RTC_SET_TARGET "rtc-set.target" /* LSB's $time */
#define SPECIAL_BASIC_TARGET "basic.target"