[systemd-commits] 11 commits - DISTRO_PORTING Makefile.am configure.ac src/cgls src/core src/delta src/detect-virt src/fsck src/hostname src/journal src/locale src/login src/machine-id-setup src/notify src/quotacheck src/rc-local-generator src/shared src/systemctl src/timedate src/tty-ask-password-agent src/vconsole units/.gitignore units/console-getty.service.m4.in units/console-shell.service.m4.in units/fedora units/getty at .service.m4 units/halt-local.service.in units/rc-local.service.in units/rescue.service.m4.in units/serial-getty at .service.m4 units/suse

Lennart Poettering lennart at kemper.freedesktop.org
Fri Jan 4 14:26:32 PST 2013


 DISTRO_PORTING                                      |   64 ++-----
 Makefile.am                                         |  100 +----------
 configure.ac                                        |  169 ++++++++------------
 src/cgls/cgls.c                                     |    1 
 src/core/dbus-manager.c                             |    7 
 src/core/hostname-setup.c                           |  111 +------------
 src/core/locale-setup.c                             |   96 -----------
 src/core/main.c                                     |    5 
 src/core/service.c                                  |   94 -----------
 src/delta/delta.c                                   |    1 
 src/detect-virt/detect-virt.c                       |    1 
 src/fsck/fsck.c                                     |   19 +-
 src/hostname/hostnamectl.c                          |    1 
 src/journal/cat.c                                   |    1 
 src/journal/coredumpctl.c                           |    1 
 src/journal/journalctl.c                            |    1 
 src/locale/localectl.c                              |    1 
 src/login/inhibit.c                                 |    1 
 src/login/loginctl.c                                |    1 
 src/machine-id-setup/machine-id-setup-main.c        |    1 
 src/notify/notify.c                                 |    1 
 src/quotacheck/quotacheck.c                         |   13 -
 src/rc-local-generator/rc-local-generator.c         |   14 -
 src/shared/calendarspec.c                           |    2 
 src/shared/util.c                                   |    2 
 src/systemctl/systemctl.c                           |    3 
 src/timedate/timedatectl.c                          |    1 
 src/timedate/timedated.c                            |   17 --
 src/tty-ask-password-agent/tty-ask-password-agent.c |    1 
 src/vconsole/vconsole-setup.c                       |  135 ---------------
 units/.gitignore                                    |    2 
 units/console-getty.service.m4.in                   |   17 --
 units/console-shell.service.m4.in                   |   20 --
 units/fedora/Makefile                               |    1 
 units/fedora/halt-local.service                     |   20 --
 units/fedora/rc-local.service                       |   19 --
 units/getty at .service.m4                             |   20 --
 units/halt-local.service.in                         |   20 ++
 units/rc-local.service.in                           |   20 ++
 units/rescue.service.m4.in                          |   11 -
 units/serial-getty at .service.m4                      |   20 --
 units/suse/halt-local.service                       |   20 --
 units/suse/rc-local.service                         |   19 --
 43 files changed, 191 insertions(+), 883 deletions(-)

New commits:
commit bc2708414babc5c99bb8000e63c84e87606cc15d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 23:24:38 2013 +0100

    build-sys: drop all distribution specfic checks
    
    Yay, we now have a completely generic systemd. No distribution specific checks anymore!

diff --git a/DISTRO_PORTING b/DISTRO_PORTING
index a6ae043..99c652c 100644
--- a/DISTRO_PORTING
+++ b/DISTRO_PORTING
@@ -4,55 +4,31 @@ HOWTO:
         You need to make the follow changes to adapt systemd to your
         distribution:
 
-        0) Make your distribution recognized via the autoconf checks
-        in configure.ac. Grep for the word "fedora" (case
-        insensitively) and you should be able to find the places where
-        you need to add/change things.
-
-        1) Patch src/shared/hostname-setup.c so that systemd knows
-        where to read your host name from. You might also want to
-        update status_welcome() in util.c.
-
-        2) Check the unit files in units/ if they match your
-        distribution. Most likely you will have to make additions to
-        units/*.m4 and create a copy of units/fedora/ with changes for
-        your distribution.
-
-        3) Adjust Makefile.am to register the unit files you added in
-        step 2. Also you might need to update the m4 invocation in
-        Makefile.am. Grep for the word "fedora" (case insensitively)
-        and you should be able to find the places where you need to
-        add/change things.
-
-        4) Try it out. Play around with 'systemd --test --system' for
+        1) Find the right configure parameters for:
+
+            --with-rootprefix=
+            --with-sysvinit-path=
+            --with-sysvrcd-path=
+            --with-rc-local-script-path-start=
+            --with-rc-local-script-path-stop=
+            --with-kbd-loadkeys=
+            --with-kbd-setfont=
+            --with-tty-gid=
+
+        2) Try it out. Play around with 'systemd --test --system' for
         a test run of systemd without booting. This will read the unit
         files and print the initial transaction it would execute
         during boot-up. This will also inform you about ordering loops
         and suchlike.
 
 CONTRIBUTING UPSTREAM:
-        We are interested in merging your changes upstream, if they
-        are for a big, and well-known distribution. Unfortunately we
-        don't have the time and resources to maintain
-        distribution-specific patches for all distributions on the
-        planet, hence please do not send us patches that add systemd
-        support for non-mainstream or niche distributions.
 
-        Thank you for understanding.
-
-BE CONSIDERATE:
-        We'd like to keep differences between the distributions
-        minimal. This both simplifies our maintenance work, as well
-        as it helps administrators to move from one distribution to
-        another.
+        We are generally do no longer accept distribution specific
+        patches to systemd upstream. If you have to make changes to
+        systemd's source code to make it work on your distribution:
+        unless your code is generic enough to be generally useful we
+        are unlikely to merge it. Please always consider adopting the
+        upstream defaults. If that's not possible please maintain the
+        relevant patches downstream.
 
-        Hence we'd like to ask you to keep your changes minimal, and
-        not rename any units without a very good reason (if you need a
-        particular name for compatibility reasons, consider using
-        alias names via symlinks). Before you make changes that change
-        semantics from upstream, please talk to us!
-
-        In SysV almost every distribution uses a different
-        nomenclature and different locations for the boot-up
-        scripts. We'd like to avoid chaos like that with systemd right
-        from the beginning. So please, be considerate!
+        Thank you for understanding.
diff --git a/Makefile.am b/Makefile.am
index b11dfb9..8f68a10 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4062,24 +4062,6 @@ if HAVE_KMOD
 		$(LN_S) ../systemd-modules-load.service systemd-modules-load.service )
 endif
 
-
-if TARGET_FEDORA
-	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f display-manager.service single.service && \
-		$(LN_S) rescue.service single.service )
-endif
-
-if TARGET_MANDRIVA
-	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f display-manager.service dm.service single.service && \
-		$(LN_S) rescue.service single.service )
-endif
-
-if TARGET_MAGEIA
-	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f display-manager.service )
-endif
-
 install-exec-hook: $(INSTALL_EXEC_HOOKS)
 
 uninstall-hook: $(UNINSTALL_DATA_HOOKS) $(UNINSTALL_EXEC_HOOKS)
diff --git a/configure.ac b/configure.ac
index 2f457fc..e6dffe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -616,12 +616,12 @@ AC_ARG_WITH(rc-local-script-path-start,
 
 AC_ARG_WITH(rc-local-script-path-stop,
         AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
-                [Path to /sbin/halt.local]),
+                [Path to /usr/sbin/halt.local]),
         [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
-        [RC_LOCAL_SCRIPT_PATH_STOP="/sbin/halt.local"])
+        [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
 
 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
-AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /sbin/halt.local script])
+AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
 
 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
@@ -697,107 +697,23 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
 
 # ------------------------------------------------------------------------------
 
-AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of fedora, suse, debian, arch, gentoo, slackware, altlinux, mandriva, mageia, angstrom or other]))
-if test "z$with_distro" = "z"; then
-        if test "$cross_compiling" = yes; then
-                AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
-        else
-                with_distro=$($GREP '^ID=' /etc/os-release 2>/dev/null | $SED 's/ID=//');
-        fi
-        if test "z$with_distro" = "z"; then
-                with_distro=other
-        fi
-fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
-AC_DEFINE_UNQUOTED(DISTRIBUTION, ["${with_distro}"], [Target Distribution])
-
 # Location of the init scripts as mandated by LSB
 SYSTEM_SYSVINIT_PATH=/etc/init.d
 SYSTEM_SYSVRCND_PATH=/etc/rc.d
-
 M4_DEFINES=
 
-case $with_distro in
-        fedora)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
-                AC_DEFINE(TARGET_FEDORA, [], [Target is Fedora/RHEL])
-                M4_DEFINES=-DTARGET_FEDORA=1
-                ;;
-        opensuse|suse)
-                SYSTEM_SYSVRCND_PATH=/etc/init.d
-                AC_DEFINE(TARGET_SUSE, [], [Target is openSUSE/SLE])
-                M4_DEFINES=-DTARGET_SUSE=1
-                ;;
-        debian)
-                SYSTEM_SYSVRCND_PATH=/etc
-                AC_DEFINE(TARGET_DEBIAN, [], [Target is Debian])
-                M4_DEFINES=-DTARGET_DEBIAN=1
-                ;;
-        arch)
-                SYSTEM_SYSVINIT_PATH=
-                SYSTEM_SYSVRCND_PATH=
-                AC_DEFINE(TARGET_ARCH, [], [Target is ArchLinux])
-                M4_DEFINES=-DTARGET_ARCH=1
-                ;;
-        gentoo)
-                SYSTEM_SYSVINIT_PATH=
-                SYSTEM_SYSVRCND_PATH=
-                AC_DEFINE(TARGET_GENTOO, [], [Target is Gentoo])
-                M4_DEFINES=-DTARGET_GENTOO=1
-                ;;
-        slackware)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
-                AC_DEFINE(TARGET_SLACKWARE, [], [Target is Slackware])
-                M4_DEFINES=-DTARGET_SLACKWARE=1
-                ;;
-        frugalware)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d
-                AC_DEFINE(TARGET_FRUGALWARE, [], [Target is Frugalware])
-                M4_DEFINES=-DTARGET_FRUGALWARE=1
-                ;;
-        altlinux)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
-                AC_DEFINE(TARGET_ALTLINUX, [], [Target is ALTLinux])
-                M4_DEFINES=-DTARGET_ALTLINUX=1
-                ;;
-        mandriva)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
-                AC_DEFINE(TARGET_MANDRIVA, [], [Target is Mandriva])
-                M4_DEFINES=-DTARGET_MANDRIVA=1
-                ;;
-        angstrom)
-                SYSTEM_SYSVRCND_PATH=/etc
-                AC_DEFINE(TARGET_ANGSTROM, [], [Target is Ångström])
-                M4_DEFINES=-DTARGET_ANGSTROM=1
-                ;;
-        mageia)
-                SYSTEM_SYSVINIT_PATH=/etc/rc.d/init.d
-                AC_DEFINE(TARGET_MAGEIA, [], [Target is Mageia])
-                M4_DEFINES=-DTARGET_MAGEIA=1
-                ;;
-        other)
-                ;;
-        *)
-                AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, SysV init scripts could not be found! (patches welcome); you can specify --with-distro=other to skip this check])
-                ;;
-esac
-
 AC_ARG_WITH([sysvinit-path],
         [AS_HELP_STRING([--with-sysvinit-path=PATH],
-                [Specify the path to where the SysV init scripts are located @<:@default=based on distro@:>@])],
+                [Specify the path to where the SysV init scripts are located])],
         [SYSTEM_SYSVINIT_PATH="$withval"],
         [])
 
 AC_ARG_WITH([sysvrcd-path],
         [AS_HELP_STRING([--with-sysvrcd-path=PATH],
-                [Specify the path to the base directory for the SysV rcN.d directories @<:@default=based on distro@:>@])],
+                [Specify the path to the base directory for the SysV rcN.d directories])],
         [SYSTEM_SYSVRCND_PATH="$withval"],
         [])
 
-AC_SUBST(SYSTEM_SYSVINIT_PATH)
-AC_SUBST(SYSTEM_SYSVRCND_PATH)
-AC_SUBST(M4_DEFINES)
-
 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
         AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
         SYSTEM_SYSV_COMPAT="yes"
@@ -808,26 +724,18 @@ else
         SYSTEM_SYSV_COMPAT="no"
 fi
 
+AC_SUBST(SYSTEM_SYSVINIT_PATH)
+AC_SUBST(SYSTEM_SYSVRCND_PATH)
+AC_SUBST(M4_DEFINES)
+
+AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
+
 AC_ARG_WITH([tty-gid],
         [AS_HELP_STRING([--with-tty-gid=GID],
                 [Specify the numeric GID of the 'tty' group])],
         [AC_DEFINE_UNQUOTED(TTY_GID, [$withval], [GID of the 'tty' group])],
         [])
 
-AM_CONDITIONAL(TARGET_FEDORA, test x"$with_distro" = xfedora)
-AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
-AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
-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)
-AM_CONDITIONAL(TARGET_FRUGALWARE, test x"$with_distro" = xfrugalware)
-AM_CONDITIONAL(TARGET_ALTLINUX, test x"$with_distro" = xaltlinux)
-AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva)
-AM_CONDITIONAL(TARGET_ANGSTROM, test x"$with_distro" = xangstrom)
-AM_CONDITIONAL(TARGET_MAGEIA, test x"$with_distro" = xmageia)
-
-AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
-
 AC_ARG_WITH([dbuspolicydir],
         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
         [],
@@ -895,7 +803,6 @@ AC_OUTPUT
 AC_MSG_RESULT([
         $PACKAGE_NAME $VERSION
 
-        Distribution:            ${with_distro}
         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index ad59c01..cfb728b 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -80,7 +80,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 262e5ff..859fa1a 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -228,7 +228,6 @@
 
 #define BUS_MANAGER_INTERFACE_PROPERTIES_GENERAL                        \
         "  <property name=\"Version\" type=\"s\" access=\"read\"/>\n"   \
-        "  <property name=\"Distribution\" type=\"s\" access=\"read\"/>\n" \
         "  <property name=\"Features\" type=\"s\" access=\"read\"/>\n"  \
         "  <property name=\"Tainted\" type=\"s\" access=\"read\"/>\n"   \
         "  <property name=\"FirmwareTimestamp\" type=\"t\" access=\"read\"/>\n" \
@@ -526,13 +525,11 @@ static int bus_manager_set_runtime_watchdog_usec(DBusMessageIter *i, const char
 
 static const char systemd_property_string[] =
         PACKAGE_STRING "\0"
-        DISTRIBUTION "\0"
         SYSTEMD_FEATURES;
 
 static const BusProperty bus_systemd_properties[] = {
-        { "Version",       bus_property_append_string,    "s",  0                                             },
-        { "Distribution",  bus_property_append_string,    "s",  sizeof(PACKAGE_STRING)                        },
-        { "Features",      bus_property_append_string,    "s",  sizeof(PACKAGE_STRING) + sizeof(DISTRIBUTION) },
+        { "Version",       bus_property_append_string,    "s",  0                      },
+        { "Features",      bus_property_append_string,    "s",  sizeof(PACKAGE_STRING) },
         { NULL, }
 };
 
diff --git a/src/core/main.c b/src/core/main.c
index dfb53a8..1ee3c9c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1064,7 +1064,6 @@ static int help(void) {
 
 static int version(void) {
         puts(PACKAGE_STRING);
-        puts(DISTRIBUTION);
         puts(SYSTEMD_FEATURES);
 
         return 0;
@@ -1567,7 +1566,7 @@ int main(int argc, char *argv[]) {
         if (arg_running_as == SYSTEMD_SYSTEM) {
                 const char *virtualization = NULL;
 
-                log_info(PACKAGE_STRING " running in system mode. (" SYSTEMD_FEATURES "; " DISTRIBUTION ")");
+                log_info(PACKAGE_STRING " running in system mode. (" SYSTEMD_FEATURES ")");
 
                 detect_virtualization(&virtualization);
                 if (virtualization)
@@ -1577,7 +1576,7 @@ int main(int argc, char *argv[]) {
                         log_info("Running in initial RAM disk.");
 
         } else
-                log_debug(PACKAGE_STRING " running in user mode. (" SYSTEMD_FEATURES "; " DISTRIBUTION ")");
+                log_debug(PACKAGE_STRING " running in user mode. (" SYSTEMD_FEATURES ")");
 
         if (arg_running_as == SYSTEMD_SYSTEM && !skip_setup) {
                 locale_setup();
diff --git a/src/delta/delta.c b/src/delta/delta.c
index a65cea5..9f20938 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -362,7 +362,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c
index bbb9dfc..bd3ee45 100644
--- a/src/detect-virt/detect-virt.c
+++ b/src/detect-virt/detect-virt.c
@@ -80,7 +80,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
index e38be89..ff1f091 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/hostname/hostnamectl.c
@@ -406,7 +406,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/journal/cat.c b/src/journal/cat.c
index 523a7a2..a95392c 100644
--- a/src/journal/cat.c
+++ b/src/journal/cat.c
@@ -81,7 +81,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 4f0ed58..b6e5581 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -170,7 +170,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         arg_action = ACTION_NONE;
                         return 0;
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 4d46beb..a74d43b 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -202,7 +202,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 383a17d..5d35f9c 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -615,7 +615,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 4735df7..9b66133 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -210,7 +210,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index cfbc5fe..e2b33a6 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1394,7 +1394,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/machine-id-setup/machine-id-setup-main.c b/src/machine-id-setup/machine-id-setup-main.c
index 6373ebc..eb2d514 100644
--- a/src/machine-id-setup/machine-id-setup-main.c
+++ b/src/machine-id-setup/machine-id-setup-main.c
@@ -67,7 +67,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/notify/notify.c b/src/notify/notify.c
index ffc8dfe..f521f56 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -94,7 +94,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index b71d5de..2ebfff8 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4201,7 +4201,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 6a1c19a..281c052 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -551,7 +551,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c
index 052c10e..99a626c 100644
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -688,7 +688,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 

commit a382332eed10d3348231803c47a4c599d24c5e3a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 23:19:02 2013 +0100

    build-sys: make path of loadkeys/setfont configurable in configure

diff --git a/Makefile.am b/Makefile.am
index 9132ccd..b11dfb9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -168,47 +168,6 @@ AM_CFLAGS = $(OUR_CFLAGS)
 AM_LDFLAGS = $(OUR_LDFLAGS)
 
 # ------------------------------------------------------------------------------
-if TARGET_GENTOO
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_ARCH
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_FRUGALWARE
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_MANDRIVA
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/bin/setfont\"
-else
-if TARGET_ANGSTROM
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_MAGEIA
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/bin/setfont\"
-else
-AM_CPPFLAGS += \
-	-DKBD_LOADKEYS=\"/bin/loadkeys\" \
-	-DKBD_SETFONT=\"/bin/setfont\"
-endif
-endif
-endif
-endif
-endif
-endif
-
-# ------------------------------------------------------------------------------
 rootbin_PROGRAMS = \
 	systemctl \
 	systemd-notify \
diff --git a/configure.ac b/configure.ac
index a39dd6a..2f457fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -627,6 +627,25 @@ AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
 
 # ------------------------------------------------------------------------------
+AC_ARG_WITH(kbd-loadkeys,
+        AS_HELP_STRING([--with-kbd-loadkeys=PATH],
+                [Path to loadkeys]),
+        [KBD_LOADKEYS="$withval"],
+        [KBD_LOADKEYS="/usr/bin/loadkeys"])
+
+AC_ARG_WITH(kbd-setfont,
+        AS_HELP_STRING([--with-kbd-setfont=PATH],
+                [Path to setfont]),
+        [KBD_SETFONT="$withval"],
+        [KBD_SETFONT="/usr/bin/setfont"])
+
+AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
+AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
+
+AC_SUBST(KBD_LOADKEYS)
+AC_SUBST(KBD_SETFONT)
+
+# ------------------------------------------------------------------------------
 AC_ARG_WITH(firmware-path,
        AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
           [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),

commit 425c608d5319cae993d786a3915064bbb580c17b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:45:34 2013 +0100

    service: drop inserv.conf parsing
    
    This Suse specific configuration file should really be done in a generator
    that is shipped downstream by suse.

diff --git a/src/core/service.c b/src/core/service.c
index 3ab0550..a4e419b 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -3319,71 +3319,6 @@ static void service_notify_message(Unit *u, pid_t pid, char **tags) {
 
 #ifdef HAVE_SYSV_COMPAT
 
-#ifdef TARGET_SUSE
-static void sysv_facility_in_insserv_conf(Manager *mgr) {
-        FILE *f=NULL;
-        int r;
-
-        if (!(f = fopen("/etc/insserv.conf", "re"))) {
-                r = errno == ENOENT ? 0 : -errno;
-                goto finish;
-        }
-
-        while (!feof(f)) {
-                char l[LINE_MAX], *t;
-                char **parsed = NULL;
-
-                if (!fgets(l, sizeof(l), f)) {
-                        if (feof(f))
-                                break;
-
-                        r = -errno;
-                        log_error("Failed to read configuration file '/etc/insserv.conf': %s", strerror(-r));
-                        goto finish;
-                }
-
-                t = strstrip(l);
-                if (*t != '$' && *t != '<')
-                        continue;
-
-                parsed = strv_split(t,WHITESPACE);
-                /* we ignore <interactive>, not used, equivalent to X-Interactive */
-                if (parsed && !startswith_no_case (parsed[0], "<interactive>")) {
-                        char *facility;
-                        Unit *u;
-                        if (sysv_translate_facility(parsed[0], NULL, &facility) < 0)
-                                continue;
-                        if ((u = manager_get_unit(mgr, facility)) && (u->type == UNIT_TARGET)) {
-                                UnitDependency e;
-                                char *dep = NULL, *name, **j;
-
-                                STRV_FOREACH (j, parsed+1) {
-                                        if (*j[0]=='+') {
-                                                e = UNIT_WANTS;
-                                                name = *j+1;
-                                        }
-                                        else {
-                                                e = UNIT_REQUIRES;
-                                                name = *j;
-                                        }
-                                        if (sysv_translate_facility(name, NULL, &dep) < 0)
-                                                continue;
-
-                                        r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, e, dep, NULL, true);
-                                        free(dep);
-                                }
-                        }
-                        free(facility);
-                }
-                strv_free(parsed);
-        }
-finish:
-        if (f)
-                fclose(f);
-
-}
-#endif
-
 static int service_enumerate(Manager *m) {
         char **p;
         unsigned i;
@@ -3529,10 +3464,6 @@ static int service_enumerate(Manager *m) {
 
         r = 0;
 
-#ifdef TARGET_SUSE
-        sysv_facility_in_insserv_conf (m);
-#endif
-
 finish:
         free(path);
         free(fpath);

commit 88516c0c952b9502e8ef1d6a1481af61b0fb422d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:43:41 2013 +0100

    service: drop the per-distro ifdefs in service.c
    
    They don't really hurt on other distros, and this allows us to ship
    the same code on all distros

diff --git a/src/core/service.c b/src/core/service.c
index 3d2be96..3ab0550 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -321,16 +321,12 @@ static char *sysv_translate_name(const char *name) {
         if (!(r = new(char, strlen(name) + sizeof(".service"))))
                 return NULL;
 
-#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
         if (endswith(name, ".sh"))
                 /* Drop Debian-style .sh suffix */
                 strcpy(stpcpy(r, name) - 3, ".service");
-#endif
-#ifdef TARGET_FRUGALWARE
         if (startswith(name, "rc."))
                 /* Drop Frugalware-style rc. prefix */
                 strcpy(stpcpy(r, name + 3), ".service");
-#endif
         else
                 /* Normal init scripts */
                 strcpy(stpcpy(r, name), ".service");
@@ -349,14 +345,11 @@ static int sysv_translate_facility(const char *name, const char *filename, char
         static const char * const table[] = {
                 /* LSB defined facilities */
                 "local_fs",             SPECIAL_LOCAL_FS_TARGET,
-#if defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-#else
                 /* Due to unfortunate name selection in Mandriva,
                  * $network is provided by network-up which is ordered
                  * after network which actually starts interfaces.
                  * To break the loop, just ignore it */
                 "network",              SPECIAL_NETWORK_TARGET,
-#endif
                 "named",                SPECIAL_NSS_LOOKUP_TARGET,
                 "portmap",              SPECIAL_RPCBIND_TARGET,
                 "remote_fs",            SPECIAL_REMOTE_FS_TARGET,
@@ -367,14 +360,8 @@ static int sysv_translate_facility(const char *name, const char *filename, char
                 "mail-transfer-agent",  SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
                 "x-display-manager",    SPECIAL_DISPLAY_MANAGER_SERVICE,
                 "null",                 NULL,
-
-#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
                 "mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
-#endif
-
-#ifdef TARGET_SUSE
                 "smtp",                 SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
-#endif
         };
 
         unsigned i;
@@ -990,15 +977,9 @@ static int service_load_sysv_name(Service *s, const char *name) {
 
         /* For SysV services we strip the rc.* and *.sh
          * prefixes/suffixes. */
-#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
         if (endswith(name, ".sh.service"))
                 return -ENOENT;
-#endif
-
-#ifdef TARGET_FRUGALWARE
         if (startswith(name, "rc."))
-                return -ENOENT;
-#endif
 
         STRV_FOREACH(p, UNIT(s)->manager->lookup_paths.sysvinit_path) {
                 char *path;
@@ -1013,16 +994,13 @@ static int service_load_sysv_name(Service *s, const char *name) {
 
                 r = service_load_sysv_path(s, path);
 
-#if defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
                 if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) {
                         /* Try Debian style *.sh source'able init scripts */
                         strcat(path, ".sh");
                         r = service_load_sysv_path(s, path);
                 }
-#endif
                 free(path);
 
-#ifdef TARGET_FRUGALWARE
                 if (r >= 0 && UNIT(s)->load_state == UNIT_STUB) {
                         /* Try Frugalware style rc.* init scripts */
 
@@ -1035,12 +1013,11 @@ static int service_load_sysv_name(Service *s, const char *name) {
                         r = service_load_sysv_path(s, path);
                         free(path);
                 }
-#endif
 
                 if (r < 0)
                         return r;
 
-                if ((UNIT(s)->load_state != UNIT_STUB))
+                if (UNIT(s)->load_state != UNIT_STUB)
                         break;
         }
 

commit 7f0086f8c9307a9a62f31a4aa5c8d3de74abd06b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:38:11 2013 +0100

    units: always use sulogin in rescue.service
    
    sushell makes much less sense than sulogin. If distros want to stick to sushell
    they should patch this downstream.

diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
index fb14baf..269797a 100644
--- a/units/rescue.service.m4.in
+++ b/units/rescue.service.m4.in
@@ -18,16 +18,7 @@ Environment=HOME=/root
 WorkingDirectory=/root
 ExecStartPre=-/bin/plymouth quit
 ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
-m4_ifdef(`TARGET_FEDORA',
-`EnvironmentFile=/etc/sysconfig/init
-ExecStart=-/bin/bash -c "exec ${SINGLE}"',
-m4_ifdef(`TARGET_MANDRIVA',
-`EnvironmentFile=/etc/sysconfig/init
-ExecStart=-/bin/bash -c "exec ${SINGLE}"',
-m4_ifdef(`TARGET_MAGEIA',
-`EnvironmentFile=/etc/sysconfig/init
-ExecStart=-/bin/bash -c "exec ${SINGLE}"',
-`ExecStart=-/sbin/sulogin')))
+ExecStart=-/sbin/sulogin
 ExecStopPost=- at SYSTEMCTL@ --fail --no-block default
 Type=idle
 StandardInput=tty-force

commit 83514a2fa0c9377e76dcc323ab7e7756b7f86cc4
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:36:48 2013 +0100

    units: drop distro specific stuff from units
    
    Since rc-local is now enabled via the SysV compatibility we should only refer
    to it based on that too.

diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in
index 9d80d4b..0426050 100644
--- a/units/console-getty.service.m4.in
+++ b/units/console-getty.service.m4.in
@@ -9,22 +9,7 @@
 Description=Console Getty
 Documentation=man:agetty(8)
 After=systemd-user-sessions.service plymouth-quit-wait.service
-m4_ifdef(`TARGET_FEDORA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_ARCH',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_FRUGALWARE',
-After=local.service
-)m4_dnl
-m4_ifdef(`TARGET_ALTLINUX',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MANDRIVA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MAGEIA',
+m4_ifdef(`HAVE_SYSV_COMPAT',
 After=rc-local.service
 )m4_dnl
 Before=getty.target
diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
index e0fbc61..dac2ac2 100644
--- a/units/console-shell.service.m4.in
+++ b/units/console-shell.service.m4.in
@@ -9,25 +9,7 @@
 Description=Console Shell
 Documentation=man:sulogin(8)
 After=systemd-user-sessions.service plymouth-quit-wait.service
-m4_ifdef(`TARGET_FEDORA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_DEBIAN',
-After=rc.local.service
-)m4_dnl
-m4_ifdef(`TARGET_ARCH',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_FRUGALWARE',
-After=local.service
-)m4_dnl
-m4_ifdef(`TARGET_ALTLINUX',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MANDRIVA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MAGEIA',
+m4_ifdef(`HAVE_SYSV_COMPAT',
 After=rc-local.service
 )m4_dnl
 Before=getty.target
diff --git a/units/getty at .service.m4 b/units/getty at .service.m4
index cc9a2ac..083eb97 100644
--- a/units/getty at .service.m4
+++ b/units/getty at .service.m4
@@ -10,25 +10,7 @@ Description=Getty on %I
 Documentation=man:agetty(8) man:systemd-getty-generator(8)
 Documentation=http://0pointer.de/blog/projects/serial-console.html
 After=systemd-user-sessions.service plymouth-quit-wait.service
-m4_ifdef(`TARGET_FEDORA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_DEBIAN',
-After=rc.local.service
-)m4_dnl
-m4_ifdef(`TARGET_ARCH',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_FRUGALWARE',
-After=local.service
-)m4_dnl
-m4_ifdef(`TARGET_ALTLINUX',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MANDRIVA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MAGEIA',
+m4_ifdef(`HAVE_SYSV_COMPAT',
 After=rc-local.service
 )m4_dnl
 
diff --git a/units/serial-getty at .service.m4 b/units/serial-getty at .service.m4
index 11f5e2c..60d7737 100644
--- a/units/serial-getty at .service.m4
+++ b/units/serial-getty at .service.m4
@@ -11,25 +11,7 @@ Documentation=man:agetty(8) man:systemd-getty-generator(8)
 Documentation=http://0pointer.de/blog/projects/serial-console.html
 BindsTo=dev-%i.device
 After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
-m4_ifdef(`TARGET_FEDORA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_DEBIAN',
-After=rc.local.service
-)m4_dnl
-m4_ifdef(`TARGET_ARCH',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_FRUGALWARE',
-After=local.service
-)m4_dnl
-m4_ifdef(`TARGET_ALTLINUX',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MANDRIVA',
-After=rc-local.service
-)m4_dnl
-m4_ifdef(`TARGET_MAGEIA',
+m4_ifdef(`HAVE_SYSV_COMPAT',
 After=rc-local.service
 )m4_dnl
 

commit 77e68fa2f0bd018bab2621a31919bfaa6a6b0a35
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:32:31 2013 +0100

    systemctl: enable chkconfig compat only if chkconfig is found rather than based on distro

diff --git a/configure.ac b/configure.ac
index 92dbdf5..a39dd6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -233,6 +233,25 @@ if test "x${have_ima}" != xno ; then
 fi
 
 # ------------------------------------------------------------------------------
+have_chkconfig=yes
+AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
+                [case "${enableval}" in
+                        yes) have_chkconfig=yes ;;
+                        no) have_chkconfig=no ;;
+                        *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
+                esac],
+                [AC_PATH_PROG(CHKCONFIG, chkconfig)
+                if test -z "$CHKCONFIG"; then
+                        have_chkconfig=no
+                else
+                        have_chkconfig=yes
+                fi])
+
+if test "x${have_chkconfig}" != xno ; then
+        AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
+fi
+
+# ------------------------------------------------------------------------------
 have_selinux=no
 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
 if test "x$enable_selinux" != "xno"; then
@@ -873,6 +892,7 @@ AC_MSG_RESULT([
         GCRYPT:                  ${have_gcrypt}
         QRENCODE:                ${have_qrencode}
         MICROHTTPD:              ${have_microhttpd}
+        CHKCONFIG:               ${have_chkconfig}
         binfmt:                  ${have_binfmt}
         vconsole:                ${have_vconsole}
         readahead:               ${have_readahead}
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 086872c..b71d5de 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3436,7 +3436,7 @@ finish:
 static int enable_sysv_units(char **args) {
         int r = 0;
 
-#if defined (HAVE_SYSV_COMPAT) && (defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_SUSE) || defined(TARGET_ALTLINUX) || defined(TARGET_MAGEIA))
+#if defined(HAVE_SYSV_COMPAT) && defined(HAVE_CHKCONFIG)
         const char *verb = args[0];
         unsigned f = 1, t = 1;
         LookupPaths paths;

commit 32f992a514949b42550b97cadb3bb5499b54ca49
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 22:00:46 2013 +0100

    fsck: remove distro specific hacks from fsck/quotacheck
    
    Move forcefsck file checks under a HAVE_SYSV_COMPAT #ifdef, and warn if this is used.

diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index 058f34d..f5d38ad 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -128,11 +128,14 @@ static int parse_proc_cmdline(void) {
                         arg_skip = true;
                 else if (startswith(w, "fsck"))
                         log_warning("Invalid fsck parameter. Ignoring.");
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-                else if (strneq(w, "fastboot", l))
+#ifdef HAVE_SYSV_COMPAT
+                else if (strneq(w, "fastboot", l)) {
+                        log_error("Please pass 'fsck.mode=skip' rather than 'fastboot' on the kernel command line.");
                         arg_skip = true;
-                else if (strneq(w, "forcefsck", l))
+                } else if (strneq(w, "forcefsck", l)) {
+                        log_error("Please pass 'fsck.mode=force' rather than 'forcefsck' on the kernel command line.");
                         arg_force = true;
+                }
 #endif
         }
 
@@ -141,11 +144,17 @@ static int parse_proc_cmdline(void) {
 }
 
 static void test_files(void) {
-        if (access("/fastboot", F_OK) >= 0)
+#ifdef HAVE_SYSV_COMPAT
+        if (access("/fastboot", F_OK) >= 0) {
+                log_error("Please pass 'fsck.mode=skip' on the kernel command line rather than creating /fastboot on the root file system.");
                 arg_skip = true;
+        }
 
-        if (access("/forcefsck", F_OK) >= 0)
+        if (access("/forcefsck", F_OK) >= 0) {
+                log_error("Please pass 'fsck.mode=force' on the kernel command line rather than creating /forcefsck on the root file system.");
                 arg_force = true;
+        }
+#endif
 
         if (access("/run/systemd/show-status", F_OK) >= 0 || plymouth_running())
                 arg_show_progress = true;
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c
index 05e4971..e7a4405 100644
--- a/src/quotacheck/quotacheck.c
+++ b/src/quotacheck/quotacheck.c
@@ -54,9 +54,11 @@ static int parse_proc_cmdline(void) {
                         arg_skip = true;
                 else if (startswith(w, "quotacheck"))
                         log_warning("Invalid quotacheck parameter. Ignoring.");
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-                else if (strneq(w, "forcequotacheck", l))
+#ifdef HAVE_SYSV_COMPAT
+                else if (strneq(w, "forcequotacheck", l)) {
+                        log_error("Please use 'quotacheck.mode=force' rather than 'forcequotacheck' on the kernel command line.");
                         arg_force = true;
+                }
 #endif
         }
 
@@ -65,10 +67,11 @@ static int parse_proc_cmdline(void) {
 }
 
 static void test_files(void) {
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-        /* This exists only on Fedora, Mandriva or Mageia */
-        if (access("/forcequotacheck", F_OK) >= 0)
+#ifdef HAVE_SYSV_COMPAT
+        if (access("/forcequotacheck", F_OK) >= 0) {
+                log_error("Please pass 'quotacheck.mode=force' on the kernel command line rather than creating /forcequotacheck on the root file system.");
                 arg_force = true;
+        }
 #endif
 }
 

commit 660ddc72f65474b4a16bd8a15d8f5cd1860b401b
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 21:51:47 2013 +0100

    Make gcc a bit quieter

diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
index 3cddb0e..c2eae3f 100644
--- a/src/shared/calendarspec.c
+++ b/src/shared/calendarspec.c
@@ -738,7 +738,7 @@ fail:
 
 static int find_matching_component(const CalendarComponent *c, int *val) {
         const CalendarComponent *n;
-        int d;
+        int d = -1;
         bool d_set = false;
         int r;
 
diff --git a/src/shared/util.c b/src/shared/util.c
index 3f00db7..49b5844 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5682,7 +5682,7 @@ oom:
 }
 
 char *strip_tab_ansi(char **ibuf, size_t *_isz) {
-        const char *i, *begin;
+        const char *i, *begin = NULL;
         enum {
                 STATE_OTHER,
                 STATE_ESCAPE,

commit b1c4ca25bf58e1925012d1dcdd83d61cecbf87fb
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 21:48:47 2013 +0100

    build-sys: make rc-local support part of SYSV compat
    
    This also drops automatic selection of the rc local scripts
    based on the local distro. Distributions now should specify the paths
    of the rc-local and halt-local scripts on the configure command line.

diff --git a/Makefile.am b/Makefile.am
index 94ae549..9132ccd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -406,34 +406,15 @@ EXTRA_DIST += \
 	units/systemd-modules-load.service.in
 endif
 
-if TARGET_FEDORA
-dist_systemunit_DATA += \
-	units/fedora/rc-local.service \
-	units/fedora/halt-local.service
-systemgenerator_PROGRAMS += \
-	systemd-rc-local-generator
-endif
-
-if TARGET_MANDRIVA
-dist_systemunit_DATA += \
-	units/fedora/rc-local.service \
-	units/fedora/halt-local.service
-systemgenerator_PROGRAMS += \
-	systemd-rc-local-generator
-endif
+if HAVE_SYSV_COMPAT
+nodist_systemunit_DATA += \
+	units/rc-local.service \
+	units/halt-local.service
 
-if TARGET_SUSE
-dist_systemunit_DATA += \
-	units/suse/rc-local.service \
-	units/suse/halt-local.service
-systemgenerator_PROGRAMS += \
-	systemd-rc-local-generator
-endif
+EXTRA_DIST += \
+	units/rc-local.service.in \
+	units/halt-local.service.in
 
-if TARGET_MAGEIA
-dist_systemunit_DATA += \
-	units/fedora/rc-local.service \
-	units/fedora/halt-local.service
 systemgenerator_PROGRAMS += \
 	systemd-rc-local-generator
 endif
@@ -3856,6 +3837,8 @@ SED_PROCESS = \
 		-e 's, at QUOTACHECK\@,$(QUOTACHECK),g' \
 		-e 's, at SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \
 		-e 's, at VARLOGDIR\@,$(varlogdir),g' \
+		-e 's, at RC_LOCAL_SCRIPT_PATH_START\@,$(RC_LOCAL_SCRIPT_PATH_START),g' \
+		-e 's, at RC_LOCAL_SCRIPT_PATH_STOP\@,$(RC_LOCAL_SCRIPT_PATH_STOP),g' \
 		< $< > $@
 
 units/%: units/%.in Makefile
@@ -4133,12 +4116,6 @@ if TARGET_MANDRIVA
 		$(LN_S) rescue.service single.service )
 endif
 
-if TARGET_SUSE
-	( cd $(DESTDIR)$(systemunitdir) && \
-		rm -f local.service && \
-		$(LN_S) rc-local.service local.service )
-endif
-
 if TARGET_MAGEIA
 	( cd $(DESTDIR)$(systemunitdir) && \
 		rm -f display-manager.service )
diff --git a/configure.ac b/configure.ac
index d0003bb..92dbdf5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -589,6 +589,25 @@ fi
 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
 
 # ------------------------------------------------------------------------------
+AC_ARG_WITH(rc-local-script-path-start,
+        AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
+                [Path to /etc/rc.local]),
+        [RC_LOCAL_SCRIPT_PATH_START="$withval"],
+        [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
+
+AC_ARG_WITH(rc-local-script-path-stop,
+        AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
+                [Path to /sbin/halt.local]),
+        [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
+        [RC_LOCAL_SCRIPT_PATH_STOP="/sbin/halt.local"])
+
+AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
+AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /sbin/halt.local script])
+
+AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
+AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
+
+# ------------------------------------------------------------------------------
 AC_ARG_WITH(firmware-path,
        AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
           [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]),
@@ -889,6 +908,8 @@ AC_MSG_RESULT([
         Split /usr:              ${enable_split_usr}
         man pages:               ${have_manpages}
         gtk-doc:                 ${enable_gtk_doc}
+        Extra start script:      ${RC_LOCAL_SCRIPT_PATH_START}
+        Extra stop script:       ${RC_LOCAL_SCRIPT_PATH_STOP}
 
         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
         CPPLAGS:                 ${OUR_CPPFLAGS} ${CPPFLAGS}
diff --git a/src/rc-local-generator/rc-local-generator.c b/src/rc-local-generator/rc-local-generator.c
index c219e77..448980b 100644
--- a/src/rc-local-generator/rc-local-generator.c
+++ b/src/rc-local-generator/rc-local-generator.c
@@ -28,13 +28,13 @@
 #include "util.h"
 #include "mkdir.h"
 
-#if defined(TARGET_FEDORA) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-#define SCRIPT_PATH_START "/etc/rc.d/rc.local"
-#elif defined(TARGET_SUSE)
-#define SCRIPT_PATH_START "/etc/init.d/boot.local"
+#ifndef RC_LOCAL_SCRIPT_PATH_START
+#define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local"
 #endif
 
-#define SCRIPT_PATH_STOP "/sbin/halt.local"
+#ifndef RC_LOCAL_SCRIPT_PATH_STOP
+#define RC_LOCAL_SCRIPT_PATH_STOP "/sbin/halt.local"
+#endif
 
 const char *arg_dest = "/tmp";
 
@@ -97,14 +97,14 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        if (file_is_executable(SCRIPT_PATH_START)) {
+        if (file_is_executable(RC_LOCAL_SCRIPT_PATH_START)) {
                 log_debug("Automatically adding rc-local.service.");
 
                 if (add_symlink("rc-local.service", "multi-user.target") < 0)
                         r = EXIT_FAILURE;
         }
 
-        if (file_is_executable(SCRIPT_PATH_STOP)) {
+        if (file_is_executable(RC_LOCAL_SCRIPT_PATH_STOP)) {
                 log_debug("Automatically adding halt-local.service.");
 
                 if (add_symlink("halt-local.service", "final.target") < 0)
diff --git a/units/.gitignore b/units/.gitignore
index 63c7ba0..5e86d30 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -1,3 +1,5 @@
+/halt-local.service
+/rc-local.service
 /systemd-hybrid-sleep.service
 /systemd-journal-gatewayd.service
 /systemd-journal-flush.service
diff --git a/units/fedora/Makefile b/units/fedora/Makefile
deleted file mode 120000
index 50be211..0000000
--- a/units/fedora/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../../src/Makefile
\ No newline at end of file
diff --git a/units/fedora/halt-local.service b/units/fedora/halt-local.service
deleted file mode 100644
index a0a3a29..0000000
--- a/units/fedora/halt-local.service
+++ /dev/null
@@ -1,20 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=/sbin/halt.local Compatibility
-ConditionFileIsExecutable=/sbin/halt.local
-DefaultDependencies=no
-After=shutdown.target
-Before=final.target
-
-[Service]
-Type=oneshot
-ExecStart=/sbin/halt.local
-TimeoutSec=0
-StandardOutput=tty
-RemainAfterExit=yes
diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service
deleted file mode 100644
index 3b3bda9..0000000
--- a/units/fedora/rc-local.service
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-# This unit gets pulled automatically into multi-user.target by
-# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
-[Unit]
-Description=/etc/rc.d/rc.local Compatibility
-After=network.target
-
-[Service]
-Type=forking
-ExecStart=/etc/rc.d/rc.local start
-TimeoutSec=0
-RemainAfterExit=yes
-SysVStartPriority=99
diff --git a/units/halt-local.service.in b/units/halt-local.service.in
new file mode 100644
index 0000000..c8be896
--- /dev/null
+++ b/units/halt-local.service.in
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=@RC_LOCAL_SCRIPT_PATH_STOP@ Compatibility
+ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_STOP@
+DefaultDependencies=no
+After=shutdown.target
+Before=final.target
+
+[Service]
+Type=oneshot
+ExecStart=@RC_LOCAL_SCRIPT_PATH_STOP@
+TimeoutSec=0
+StandardOutput=tty
+RemainAfterExit=yes
diff --git a/units/rc-local.service.in b/units/rc-local.service.in
new file mode 100644
index 0000000..97d44a7
--- /dev/null
+++ b/units/rc-local.service.in
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+# This unit gets pulled automatically into multi-user.target by
+# systemd-rc-local-generator if @RC_LOCAL_SCRIPT_PATH_START@ is executable.
+[Unit]
+Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility
+ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_START@
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=@RC_LOCAL_SCRIPT_PATH_START@ start
+TimeoutSec=0
+RemainAfterExit=yes
+SysVStartPriority=99
diff --git a/units/suse/halt-local.service b/units/suse/halt-local.service
deleted file mode 100644
index 3a3a793..0000000
--- a/units/suse/halt-local.service
+++ /dev/null
@@ -1,20 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-[Unit]
-Description=/etc/init.d/halt.local Compatibility
-ConditionFileIsExecutable=/etc/init.d/halt.local
-DefaultDependencies=no
-After=shutdown.target
-Before=final.target
-
-[Service]
-Type=oneshot
-ExecStart=/etc/init.d/halt.local
-TimeoutSec=0
-StandardOutput=tty
-RemainAfterExit=yes
diff --git a/units/suse/rc-local.service b/units/suse/rc-local.service
deleted file mode 100644
index 0fd70e0..0000000
--- a/units/suse/rc-local.service
+++ /dev/null
@@ -1,19 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU Lesser General Public License as published by
-#  the Free Software Foundation; either version 2.1 of the License, or
-#  (at your option) any later version.
-
-# This unit gets pulled automatically into multi-user.target by
-# systemd-rc-local-generator if /etc/init.d/boot.local is executable.
-[Unit]
-Description=/etc/init.d/boot.local Compatibility
-After=network.target
-
-[Service]
-Type=oneshot
-ExecStart=/etc/init.d/boot.local
-TimeoutSec=0
-RemainAfterExit=yes
-SysVStartPriority=99

commit 46a2911bf2780f616396df5671dd901cc7cb54fd
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 4 18:37:49 2013 +0100

    core: drop support for old per-distro configuration files for console, hostname, locale, timezone
    
    This simplifies the upstream system code quite a bit. If downstream distributions want to maintain compatibility with their old configuration files, they are welcome to do so, but need to maintain this as patches downstream. The burden needs to be on the distributions to maintain differences here. Our suggestion however is to just convert the old configuration files on upgrade, as multiple distributions already do.

diff --git a/src/core/hostname-setup.c b/src/core/hostname-setup.c
index dbd2227..7894f8a 100644
--- a/src/core/hostname-setup.c
+++ b/src/core/hostname-setup.c
@@ -30,14 +30,6 @@
 #include "util.h"
 #include "log.h"
 
-#if defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-#define FILENAME "/etc/sysconfig/network"
-#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
-#define FILENAME "/etc/HOSTNAME"
-#elif defined(TARGET_GENTOO)
-#define FILENAME "/etc/conf.d/hostname"
-#endif
-
 static int read_and_strip_hostname(const char *path, char **hn) {
         char *s;
         int r;
@@ -57,103 +49,23 @@ static int read_and_strip_hostname(const char *path, char **hn) {
         }
 
         *hn = s;
-
-        return 0;
-}
-
-static int read_distro_hostname(char **hn) {
-
-#if defined(TARGET_GENTOO) || defined(TARGET_ALTLINUX) || defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-        int r;
-        _cleanup_fclose_ FILE *f = NULL;
-
-        assert(hn);
-
-        f = fopen(FILENAME, "re");
-        if (!f)
-                return -errno;
-
-        for (;;) {
-                char line[LINE_MAX];
-                char *s, *k;
-
-                if (!fgets(line, sizeof(line), f)) {
-                        if (feof(f))
-                                break;
-
-                        r = -errno;
-                        goto finish;
-                }
-
-                s = strstrip(line);
-
-                if (!startswith_no_case(s, "HOSTNAME="))
-                        continue;
-
-                k = strdup(s+9);
-                if (!k) {
-                        r = -ENOMEM;
-                        goto finish;
-                }
-
-                hostname_cleanup(k);
-
-                if (isempty(k)) {
-                        free(k);
-                        r = -ENOENT;
-                        goto finish;
-                }
-
-                *hn = k;
-                r = 0;
-                goto finish;
-        }
-
-        r = -ENOENT;
-
-finish:
-        return r;
-
-#elif defined(TARGET_SUSE) || defined(TARGET_SLACKWARE)
-        return read_and_strip_hostname(FILENAME, hn);
-#else
-        return -ENOENT;
-#endif
-}
-
-static int read_hostname(char **hn) {
-        int r;
-
-        assert(hn);
-
-        /* First, try to load the generic hostname configuration file,
-         * that we support on all distributions */
-
-        r = read_and_strip_hostname("/etc/hostname", hn);
-        if (r < 0) {
-                if (r == -ENOENT)
-                        return read_distro_hostname(hn);
-
-                return r;
-        }
-
         return 0;
 }
 
 int hostname_setup(void) {
         int r;
-        char *b = NULL;
-        const char *hn = NULL;
+        _cleanup_free_ char *b = NULL;
+        const char *hn;
         bool enoent = false;
 
-        r = read_hostname(&b);
+        r = read_and_strip_hostname("/etc/hostname", &b);
         if (r < 0) {
-                hn = NULL;
-
                 if (r == -ENOENT)
                         enoent = true;
                 else
                         log_warning("Failed to read configured hostname: %s", strerror(-r));
+
+                hn = NULL;
         } else
                 hn = b;
 
@@ -161,7 +73,7 @@ int hostname_setup(void) {
                 /* Don't override the hostname if it is already set
                  * and not explicitly configured */
                 if (hostname_is_set())
-                        goto finish;
+                        return 0;
 
                 if (enoent)
                         log_info("No hostname configured.");
@@ -171,12 +83,9 @@ int hostname_setup(void) {
 
         if (sethostname(hn, strlen(hn)) < 0) {
                 log_warning("Failed to set hostname to <%s>: %m", hn);
-                r = -errno;
-        } else
-                log_info("Set hostname to <%s>.", hn);
-
-finish:
-        free(b);
+                return -errno;
+        }
 
-        return r;
+        log_info("Set hostname to <%s>.", hn);
+        return 0;
 }
diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
index 8821fc2..48b59bf 100644
--- a/src/core/locale-setup.c
+++ b/src/core/locale-setup.c
@@ -74,9 +74,6 @@ int locale_setup(void) {
 
         if (detect_container(NULL) <= 0) {
                 r = parse_env_file("/proc/cmdline", WHITESPACE,
-#if defined(TARGET_FEDORA)
-                                   "LANG",                     &variables[VARIABLE_LANG],
-#endif
                                    "locale.LANG",              &variables[VARIABLE_LANG],
                                    "locale.LANGUAGE",          &variables[VARIABLE_LANGUAGE],
                                    "locale.LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
@@ -121,99 +118,6 @@ int locale_setup(void) {
                         log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
         }
 
-#if defined(TARGET_ALTLINUX)
-        if (r <= 0) {
-                r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
-                                   "LANG", &variables[VARIABLE_LANG],
-                                   NULL);
-
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
-        }
-
-#elif defined(TARGET_SUSE)
-        if (r <= 0) {
-                r = parse_env_file("/etc/sysconfig/language", NEWLINE,
-                                   "RC_LANG", &variables[VARIABLE_LANG],
-                                   NULL);
-
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r));
-        }
-
-#elif defined(TARGET_DEBIAN) || defined(TARGET_ANGSTROM)
-        if (r <= 0) {
-                r = parse_env_file("/etc/default/locale", NEWLINE,
-                                   "LANG",              &variables[VARIABLE_LANG],
-                                   "LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
-                                   "LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
-                                   "LC_TIME",           &variables[VARIABLE_LC_TIME],
-                                   "LC_COLLATE",        &variables[VARIABLE_LC_COLLATE],
-                                   "LC_MONETARY",       &variables[VARIABLE_LC_MONETARY],
-                                   "LC_MESSAGES",       &variables[VARIABLE_LC_MESSAGES],
-                                   "LC_PAPER",          &variables[VARIABLE_LC_PAPER],
-                                   "LC_NAME",           &variables[VARIABLE_LC_NAME],
-                                   "LC_ADDRESS",        &variables[VARIABLE_LC_ADDRESS],
-                                   "LC_TELEPHONE",      &variables[VARIABLE_LC_TELEPHONE],
-                                   "LC_MEASUREMENT",    &variables[VARIABLE_LC_MEASUREMENT],
-                                   "LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
-                                   NULL);
-
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/default/locale: %s", strerror(-r));
-        }
-
-#elif defined(TARGET_GENTOO)
-        /* Gentoo's openrc expects locale variables in /etc/env.d/
-         * These files are later compiled by env-update into shell
-         * export commands at /etc/profile.env, with variables being
-         * exported by openrc's runscript (so /etc/init.d/)
-         */
-        if (r <= 0) {
-                r = parse_env_file("/etc/profile.env", NEWLINE,
-                                   "export LANG",              &variables[VARIABLE_LANG],
-                                   "export LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
-                                   "export LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
-                                   "export LC_TIME",           &variables[VARIABLE_LC_TIME],
-                                   "export LC_COLLATE",        &variables[VARIABLE_LC_COLLATE],
-                                   "export LC_MONETARY",       &variables[VARIABLE_LC_MONETARY],
-                                   "export LC_MESSAGES",       &variables[VARIABLE_LC_MESSAGES],
-                                   "export LC_PAPER",          &variables[VARIABLE_LC_PAPER],
-                                   "export LC_NAME",           &variables[VARIABLE_LC_NAME],
-                                   "export LC_ADDRESS",        &variables[VARIABLE_LC_ADDRESS],
-                                   "export LC_TELEPHONE",      &variables[VARIABLE_LC_TELEPHONE],
-                                   "export LC_MEASUREMENT",    &variables[VARIABLE_LC_MEASUREMENT],
-                                   "export LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
-                                   NULL);
-
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/profile.env: %s", strerror(-r));
-        }
-
-#elif defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-        if (r <= 0) {
-                r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
-                                   "LANG",              &variables[VARIABLE_LANG],
-                                   "LC_CTYPE",          &variables[VARIABLE_LC_CTYPE],
-                                   "LC_NUMERIC",        &variables[VARIABLE_LC_NUMERIC],
-                                   "LC_TIME",           &variables[VARIABLE_LC_TIME],
-                                   "LC_COLLATE",        &variables[VARIABLE_LC_COLLATE],
-                                   "LC_MONETARY",       &variables[VARIABLE_LC_MONETARY],
-                                   "LC_MESSAGES",       &variables[VARIABLE_LC_MESSAGES],
-                                   "LC_PAPER",          &variables[VARIABLE_LC_PAPER],
-                                   "LC_NAME",           &variables[VARIABLE_LC_NAME],
-                                   "LC_ADDRESS",        &variables[VARIABLE_LC_ADDRESS],
-                                   "LC_TELEPHONE",      &variables[VARIABLE_LC_TELEPHONE],
-                                   "LC_MEASUREMENT",    &variables[VARIABLE_LC_MEASUREMENT],
-                                   "LC_IDENTIFICATION", &variables[VARIABLE_LC_IDENTIFICATION],
-                                   NULL);
-
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
-        }
-
-#endif
-
         if (!variables[VARIABLE_LANG]) {
                 variables[VARIABLE_LANG] = strdup("C");
                 if (!variables[VARIABLE_LANG]) {
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 784dadc..fdb4335 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -199,19 +199,10 @@ static int write_data_timezone(void) {
         int r = 0;
         _cleanup_free_ char *p = NULL;
 
-#ifdef TARGET_DEBIAN
-        struct stat st;
-#endif
-
         if (!tz.zone) {
                 if (unlink("/etc/localtime") < 0 && errno != ENOENT)
                         r = -errno;
 
-#ifdef TARGET_DEBIAN
-                if (unlink("/etc/timezone") < 0 && errno != ENOENT)
-                        r = -errno;
-#endif
-
                 return r;
         }
 
@@ -223,14 +214,6 @@ static int write_data_timezone(void) {
         if (r < 0)
                 return r;
 
-#ifdef TARGET_DEBIAN
-        if (stat("/etc/timezone", &st) == 0 && S_ISREG(st.st_mode)) {
-                r = write_one_line_file_atomic("/etc/timezone", tz.zone);
-                if (r < 0)
-                        return r;
-        }
-#endif
-
         return 0;
 }
 
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index ca20849..b9d8681 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -164,12 +164,6 @@ int main(int argc, char **argv) {
         char *vc_font = NULL;
         char *vc_font_map = NULL;
         char *vc_font_unimap = NULL;
-#ifdef TARGET_GENTOO
-        char *vc_unicode = NULL;
-#endif
-#if defined(TARGET_MANDRIVA) || defined(TARGET_MAGEIA)
-        char *vc_keytable = NULL;
-#endif
         int fd = -1;
         bool utf8;
         int r = EXIT_FAILURE;
@@ -230,135 +224,6 @@ int main(int argc, char **argv) {
         }
 
         if (r <= 0) {
-#if defined(TARGET_SUSE)
-                r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
-                                   "KEYTABLE", &vc_keymap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r));
-
-                r = parse_env_file("/etc/sysconfig/console", NEWLINE,
-                                   "CONSOLE_FONT", &vc_font,
-                                   "CONSOLE_SCREENMAP", &vc_font_map,
-                                   "CONSOLE_UNICODEMAP", &vc_font_unimap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
-
-#elif defined(TARGET_ALTLINUX)
-                r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
-                                   "KEYTABLE", &vc_keymap,
-                                   NULL)
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r));
-
-                r = parse_env_file("/etc/sysconfig/consolefont", NEWLINE,
-                                   "SYSFONT", &vc_font,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/consolefont: %s", strerror(-r));
-
-#elif defined(TARGET_GENTOO)
-                r = parse_env_file("/etc/rc.conf", NEWLINE,
-                                   "unicode", &vc_unicode,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/rc.conf: %s", strerror(-r));
-
-                if (vc_unicode) {
-                        int rc_unicode;
-
-                        rc_unicode = parse_boolean(vc_unicode);
-                        if (rc_unicode < 0)
-                                log_warning("Unknown value for /etc/rc.conf unicode=%s", vc_unicode);
-                        else {
-                                if (rc_unicode && !utf8)
-                                        log_warning("/etc/rc.conf wants unicode, but current locale is not UTF-8 capable!");
-                                else if (!rc_unicode && utf8) {
-                                        log_debug("/etc/rc.conf does not want unicode, leave it on in kernel but does not apply to vconsole.");
-                                        utf8 = false;
-                                }
-                        }
-                }
-
-                /* /etc/conf.d/consolefont comments and gentoo
-                 * documentation mention uppercase, but the actual
-                 * contents are lowercase.  the existing
-                 * /etc/init.d/consolefont tries both
-                 */
-                r = parse_env_file("/etc/conf.d/consolefont", NEWLINE,
-                                   "CONSOLEFONT", &vc_font,
-                                   "consolefont", &vc_font,
-                                   "consoletranslation", &vc_font_map,
-                                   "CONSOLETRANSLATION", &vc_font_map,
-                                   "unicodemap", &vc_font_unimap,
-                                   "UNICODEMAP", &vc_font_unimap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/conf.d/consolefont: %s", strerror(-r));
-
-                r = parse_env_file("/etc/conf.d/keymaps", NEWLINE,
-                                   "keymap", &vc_keymap,
-                                   "KEYMAP", &vc_keymap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/conf.d/keymaps: %s", strerror(-r));
-
-#elif defined(TARGET_MANDRIVA) || defined (TARGET_MAGEIA)
-
-                r = parse_env_file("/etc/sysconfig/i18n", NEWLINE,
-                                   "SYSFONT", &vc_font,
-                                   "SYSFONTACM", &vc_font_map,
-                                   "UNIMAP", &vc_font_unimap,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r));
-
-                r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
-                                   "KEYTABLE", &vc_keytable,
-                                   "KEYMAP", &vc_keymap,
-                                   "UNIKEYTABLE", &vc_keymap,
-                                   "GRP_TOGGLE", &vc_keymap_toggle,
-                                   NULL);
-                if (r < 0 && r != -ENOENT)
-                        log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r));
-
-                if (vc_keytable) {
-                        free(vc_keymap);
-                        if (utf8) {
-                                if (endswith(vc_keytable, ".uni") || strstr(vc_keytable, ".uni."))
-                                        vc_keymap = strdup(vc_keytable);
-                                else {
-                                        char *s;
-                                        s = strstr(vc_keytable, ".map");
-                                        if (s)
-                                                vc_keytable[s-vc_keytable+1] = '\0';
-                                        vc_keymap = strappend(vc_keytable, ".uni");
-                                }
-                        } else
-                                vc_keymap = strdup(vc_keytable);
-
-                        free(vc_keytable);
-
-                        if (!vc_keymap) {
-                                log_oom();
-                                goto finish;
-                        }
-                }
-
-                if (access("/etc/sysconfig/console/default.kmap", F_OK) >= 0) {
-                        char *t;
-
-                        t = strdup("/etc/sysconfig/console/default.kmap");
-                        if (!t) {
-                                log_oom();
-                                goto finish;
-                        }
-
-                        free(vc_keymap);
-                        vc_keymap = t;
-                }
-#endif
         }
 
         r = EXIT_FAILURE;



More information about the systemd-commits mailing list