[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#697650: live-config: locales boot params accepting short modes



Package: live-config
Version: 3.0.15-1
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

This patch includes back the feature (and only this one) to accept
settings like "locales=ch", but also "locales=fr_CH", and it will translate
to the complete correct setting


- -- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-config depends on:
ii  live-config-sysvinit [live-config-backend]  3.0.15-1

Versions of packages live-config recommends:
ii  console-tools           1:0.2.3dbs-70
ii  keyboard-configuration  1.88
ii  live-config-doc         3.0.15-1
ii  live-tools              3.0.16-1
ii  locales                 2.13-37
ii  sudo                    1.8.5p2-1
ii  user-setup              1.48

Versions of packages live-config suggests:
ii  pciutils  1:3.1.9-6
ii  wget      1.13.4-3

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCAAGBQJQ62uTAAoJEKLHmb/f+NfC7+0P/AqDjlalzVH87bciSPpDtXjS
DBsdrCH/0F5k2wmCGrGAjik00m/8FIgFCsVizCtgG8jQSDw6lYBbdggSRTwiPQyz
dRMsslp58rEvoS/eKZiIx0qyedG+p8/JmfIHaKq/Q9ldZt8jGlphWgjOAqpSZFcy
u6OmwIbv7qzBYL4wX29B0988sPLOn3KVF3CN206eFuCya4hNyYSS4bpF3rhcGyeE
jL/vVk+n6mFCXM9TD5wLX2WXELFBaC2JdxX37kMh+mKWSumCh2SQsJudDQoW46Mk
sTEUsW7WVO60073rYvaWXL3Iv5hSqj1wAsc6t1eRza1tag73sMbYUKKNI1d3O72R
RaWsExPaWcDVtELz+z0kahq8xLIZ+bXqn9RdgAqPuqdURdNBUFgmOuCFnlMYuYN/
fW+nHg/boR0f8JmaNxT24mNGJMEc0+UeU7r0ZvUTezODepFfRk79EMDvk5WlGnI5
T/SaQjm45E5TaKqIJFo9RNr52YzMKJaEF29jnad4+p3jhjupZpwVu1D+reTm0Z8A
5xI7Bf+vGVVMdw9MiDak5gO9kj7JC8aNiZn/XOxQcZASH72z0MtXgCemK00qnXLL
VVsjlrNj1VHKQCP401J2COcA1QHev7ii0di4fad1TLwOERQIJ1fn1WPR2H4a9Efr
8mM22ahWbwNVJJyEvBDD
=XoC0
-----END PGP SIGNATURE-----
--- a/scripts/config/0050-locales
+++ b/scripts/config/0050-locales
@@ -40,6 +40,19 @@ Locales ()
 
 Configure_locales ()
 {
+        # input is like "locale=ch", so we will convert and setup
+        if echo "${_LOCALE}" | grep -sqE '^[[:lower:]]{2}$'
+        then
+            _LOCALE_UP=$(echo "${_LOCALE}" | tr '[a-z]' '[A-Z]')
+            _LOCALE="${_LOCALE}_${_LOCALE_UP}.UTF-8"
+        fi
+
+        # input is like "locale=fr_CH", so we will convert and setup
+        if echo "${_LOCALE}" | grep -sqE '^[[:lower:]]{2}_[[:upper:]]{2}$'
+        then
+            _LOCALE="${_LOCALE}.UTF-8"
+        fi
+
 	if echo "${LIVE_LOCALES}" | grep -qs ","
 	then
 		# multiple locales specified

Reply to: