~oddbloke/ubuntu/precise/cloud-init/lp1374600

« back to all changes in this revision

Viewing changes to tools/Z99-cloud-locale-test.sh

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2012-11-12 17:01:54 UTC
  • Revision ID: package-import@ubuntu.com-20121112170154-37170939vlg68nst
Tags: 0.6.3-0ubuntu1.2
* debian/patches/lp-978127-maas-oauth-fix-bad-clock.patch: fix usage of
  oauth in maas data source if local system has a bad clock (LP: #978127)
* debian/cloud-init.preinst: fix bug where user data scripts re-ran on
  upgrade from 10.04 versions (LP: #1049146)
* debian/patches/lp-974509-detect-dns-server-redirection.patch: detect dns
  server redirection and disable searching dns for a mirror named
  'ubuntu-mirror' (LP: #974509)
* debian/patches/lp-1018554-shutdown-message-to-console.patch: write a
  message to the console on system shutdown. (LP: #1018554)
* debian/patches/lp-1066115-landscape-install-fix-perms.patch: install
  landscape package if needed which will ensure proper permissions on config
  file (LP: #1066115).
* debian/patches/lp-1070345-landscape-restart-after-change.patch: restart
  landscape after modifying config (LP: #1070345)
* debian/patches/lp-1073077-zsh-workaround-for-locale_warn.patch: avoid
  warning when user's shell is zsh (LP: #1073077)
* debian/patches/rework-mirror-selection.patch: improve mirror selection by:
  * allowing region/availability-zone to be part of mirror (LP: #1037727)
  * making mirror selection arch aware (LP: #1028501)
  * allow specification of a security mirror (LP: #1006963)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#
11
11
 
12
12
locale_warn() {
13
 
        local cr="
14
 
"
15
 
        local bad_names="" bad_lcs="" key="" value="" var=""
 
13
        local bad_names="" bad_lcs="" key="" val="" var="" vars=""
16
14
        local w1 w2 w3 w4 remain
 
15
 
 
16
        # if shell is zsh, act like sh only for this function (-L).
 
17
        # The behavior change will not permenently affect user's shell.
 
18
        [ "${ZSH_NAME+zsh}" = "zsh" ] && emulate -L sh
 
19
 
17
20
        # locale is expected to output either:
18
21
        # VARIABLE=
19
22
        # VARIABLE="value"
32
35
        for bad in $bad_names; do
33
36
                for var in ${vars}; do
34
37
                        [ "${bad}" = "${var%=*}" ] || continue
35
 
                        value=${var#*=}
36
 
                        [ "${bad_lcs#* ${value}}" = "${bad_lcs}" ] &&
37
 
                                bad_lcs="${bad_lcs} ${value}"
 
38
                        val=${var#*=}
 
39
                        [ "${bad_lcs#* ${val}}" = "${bad_lcs}" ] &&
 
40
                                bad_lcs="${bad_lcs} ${val}"
38
41
                        break
39
42
                done
40
43
        done