]> err.no Git - systemd/commitdiff
units: automatically generated syslog.target
authorLennart Poettering <lennart@poettering.net>
Sun, 16 May 2010 19:12:12 +0000 (21:12 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 16 May 2010 19:15:46 +0000 (21:15 +0200)
Makefile.am
configure.ac
src/manager.h

index 963c64838e7eca041b4d7fb3f6520b080107002c..780ded62fa95655168dd5a847e519e2b6ec63ed5 100644 (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
index 691d97000937b301c69a141038b5102ad3034930..850987d7bc5f2b89e51cca0a0445250bff687165 100644 (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}
 "
index a6500ac6007137df2da7136257621ae241973c4c..424ce879afcf52d30d7d306cc3079ab66f7cae30 100644 (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"