diff options
author | Andrey Borzenkov <arvidjaar@gmail.com> | 2011-03-08 19:47:29 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-08 19:47:36 +0100 |
commit | 1de4d79bf554946f486adf56ed765c5335816f15 (patch) | |
tree | 1a9959d84694b23fde107f59e74b3fab98be9e50 /src/locale-setup.c | |
parent | 6e25b33cddf77c90d351dee6442c51bd19e2b7a8 (diff) |
build-sys: add Mandriva distribution supportsystemd/v20
This merges several separate patches that I carry as part of
Mandriva systemd RPM. They touch those parts that are very
unlikely to be changed in near future and do not impose any
functionality change for systemd core. I also think it is
useful for troubleshooting to have real distribution name in
system logs, espicially when someone reports problem upstream.
The patch looks bigger than sum of replaced patches because
- previous patches were applied on top of distro=fedora, now
I need to add all those bits for distro=mandriva as well
- part of patch was done as spec file magic, but it seems more
logical to ship all these bits together
Diffstat (limited to 'src/locale-setup.c')
-rw-r--r-- | src/locale-setup.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/locale-setup.c b/src/locale-setup.c index 2360cea85b..7684681cca 100644 --- a/src/locale-setup.c +++ b/src/locale-setup.c @@ -181,6 +181,28 @@ int locale_setup(void) { if (r != -ENOENT) log_warning("Failed to read /etc/profile.env: %s", strerror(-r)); } +#elif defined(TARGET_MANDRIVA) + 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)) < 0) { + + if (r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/i18n: %s", strerror(-r)); + } + #endif if (!variables[VARIABLE_LANG]) { |