default_locale = get_option('default-locale')
conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
+nspawn_locale = get_option('nspawn-locale')
+conf.set_quoted('SYSTEMD_NSPAWN_LOCALE', nspawn_locale)
+
localegen_path = get_option('localegen-path')
if localegen_path != ''
conf.set_quoted('LOCALEGEN_PATH', localegen_path)
description : 'support for shadow group')
option('default-locale', type : 'string', value : 'C.UTF-8',
description : 'default locale used when /etc/locale.conf does not exist')
+option('nspawn-locale', type : 'string', value : 'C.UTF-8',
+ description : 'default locale used by systemd-nspawn when executing commands in a container')
option('localegen-path', type : 'string', value : '',
description : 'absolute path to the locale-gen binary in case the system is using locale-gen')
option('service-watchdog', type : 'string', value : '3min',
}
if (arg_start_mode != START_BOOT) {
- /* If we're running a command in the container, let's default to the C.UTF-8 locale as it's
- * part of glibc these days and was backported to most distros a long time before it got
- * added to upstream glibc. */
- envp[n_env] = strdup("LANG=C.UTF-8");
+ envp[n_env] = strdup("LANG=" SYSTEMD_NSPAWN_LOCALE);
if (!envp[n_env])
return log_oom();
n_env++;