[arch-projects] [initscripts] [PATCH 11/12] Simplify LC_* unsetting
Dave Reisner
d at falconindy.com
Sat Jun 25 14:00:54 EDT 2011
On Sat, Jun 25, 2011 at 12:16:03PM +0200, Kurt J. Bosch wrote:
> ---
> functions | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/functions b/functions
> index 86b9602..2e4ba42 100644
> --- a/functions
> +++ b/functions
> @@ -62,9 +62,7 @@ unset TERM_COLORS
> unset TZ
>
> # sanitize the locale settins
> -unset LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
> - LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE \
> - LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
> +unset "${!LC_@}"
> if [[ $DAEMON_LOCALE = [yY][eE][sS] && $LOCALE ]]; then
> export LANG="${LOCALE}"
> else
> --
> 1.7.1
>
I'm all for simplifying things, but this will unset _anything_ starting
with LC_ which could conceivably be something a calling script cares about.
dave
More information about the arch-projects
mailing list