Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=677c47eb09652d19d65f0d488e39f8181d4fa3e0
commit 677c47eb09652d19d65f0d488e39f8181d4fa3e0 Author: James Buren <[email protected]> Date: Fri Mar 1 08:59:26 2013 -0600 Revert "comment out direct writing of locale.conf" This reverts commit a6fd292851b2a1355d7f5df8e2b7ea585636b6d9. diff --git a/new/fwsetup/postconfig.c b/new/fwsetup/postconfig.c index 42ada21..c674864 100644 --- a/new/fwsetup/postconfig.c +++ b/new/fwsetup/postconfig.c @@ -26,7 +26,6 @@ static size_t tz_size = 0; static size_t tz_count = 0; static char **tz_data = 0; -#if 0 static bool write_locale_conf(void) { const char *var = "LANG"; @@ -90,54 +89,6 @@ static bool write_locale_conf(void) return true; } -#endif - -static bool locale_action(void) -{ - const char *var = "LANG"; - const char *locale = 0; - char command[_POSIX_ARG_MAX] = {0}; - size_t i = 0; - static const char *vars[] = - { - "LC_CTYPE", - "LC_NUMERIC", - "LC_TIME", - "LC_COLLATE", - "LC_MONETARY", - "LC_MESSAGES", - "LC_PAPER", - "LC_NAME", - "LC_ADDRESS", - "LC_TELEPHONE", - "LC_MEASUREMENT", - "LC_IDENTIFICATION", - 0 - }; - - if((locale = getenv(var)) == 0 || strlen(locale) == 0) - { - eprintf("%s is not defined.\n",var); - return false; - } - - strfcpy(command,sizeof(command),"localectl set-locale '%s=%s'",var,locale); - - for( ; vars[i] != 0 ; ++i ) - { - var = vars[i]; - - if((locale = getenv(var)) == 0 || strlen(locale) == 0) - continue; - - strfcat(command,sizeof(command)," '%s=%s'",var,locale); - } - - if(!execute(command,INSTALL_ROOT,0)) - return false; - - return true; -} static bool is_root_setup(void) { @@ -369,7 +320,7 @@ static bool postconfig_run(void) return false; } - if(!locale_action()) + if(!write_locale_conf()) return false; if(!is_root_setup() && (!ui_window_root(&account) || !root_action(&account))) _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
