diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-04-04 13:26:14 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-04-04 13:26:14 -0400 |
commit | aef06a1aa581ae0adbe53ff874916bd830870e0f (patch) | |
tree | bab0aafdacee7f6497abca971abb82ef3eda9235 /tools/Z99-cloud-locale-test.sh | |
parent | 969aac2e95d4cb202450726cf0b7d4b16fba4211 (diff) | |
download | vyos-cloud-init-aef06a1aa581ae0adbe53ff874916bd830870e0f.tar.gz vyos-cloud-init-aef06a1aa581ae0adbe53ff874916bd830870e0f.zip |
Only show this message one time.
Diffstat (limited to 'tools/Z99-cloud-locale-test.sh')
-rwxr-xr-x | tools/Z99-cloud-locale-test.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/Z99-cloud-locale-test.sh b/tools/Z99-cloud-locale-test.sh index bbd2ca7a..ae45c1da 100755 --- a/tools/Z99-cloud-locale-test.sh +++ b/tools/Z99-cloud-locale-test.sh @@ -69,14 +69,15 @@ locale_warn() { printf "To see all available language packs, run:\n" printf " apt-cache search \"^language-pack-[a-z][a-z]$\"\n" - printf "To disable for all users, run:\n" + printf "To disable this message for all users, run:\n" printf " sudo touch /var/lib/cloud/instance/locale-check.skip\n" - printf "To disable this check for this user only, run: \n" - printf " touch ~/.locale-test.skip \n" printf "_____________________________________________________________________\n\n" + + # only show the message once + : > ~/.cloud-locale-test.skip 2>/dev/null || : } -[ -f /home/${USER}/.locale-test.skip -o -f /var/lib/cloud/instance/locale-check.skip ] || +[ -f ~/.cloud-locale-test.skip -o -f /var/lib/cloud/instance/locale-check.skip ] || locale 2>&1 | locale_warn unset locale_warn |