Commit 74a91c28 authored by anonym's avatar anonym

Add set -u to all gettext:ized shell scripts.

In gettext-base < 1.8.2, like the one we had in Wheezy, gettext.sh
references the environment variable ZSH_VERSION, which we do not
set. This has prevented us from doing `set -u` in all gettext:ized
shell scripts unless we first initialize that variable before sourcing
gettext.sh.

Now that we install a new enough gettext-base, we can finally do this
and remove the initialization hacks.

Will-fix: #9371
parent 1b1e5ad1
#!/bin/sh
set -u
. gettext.sh
TEXTDOMAIN="tails"
export TEXTDOMAIN
......
#!/bin/sh
set -e
set -u
. gettext.sh
TEXTDOMAIN="tails"
......
......@@ -7,9 +7,8 @@
# directories where only root can write.
export PATH='/usr/local/bin:/usr/bin:/bin'
# Do not "set -u", else importing gettext.sh dies
# with "ZSH_VERSION: parameter not set".
set -e
set -u
. gettext.sh
TEXTDOMAIN="tails"
......
#!/bin/sh
set -e
set -u
# This script spoofs or resets the MAC address of all NICs given as
# arguments according to the setting in Tails Greeter. The default (i.e
......
#!/bin/sh
set -e
set -u
# Import the TBB_EXT variable, and guess_best_tor_browser_locale().
. /usr/local/lib/tails-shell-library/tor-browser.sh
......
......@@ -2,7 +2,6 @@
set -e
set -u
ZSH_VERSION="${ZSH_VERSION:-}"
# Get LANG
. /etc/default/locale
......
#!/bin/sh
set -e
set -u
# Import tor_is_working()
. /usr/local/lib/tails-shell-library/tor.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment