It looks like a proper check if $YUM_REPO is set is present, but in fact
due to 'set -o nounset' we will get the following fatal error:

  YUM_REPO: unbound variable

Fix that by using bash feature of substiting some value if variable is unset.
Apparently in this case it doesn't complain about unbound variable.

Signed-off-by: Kir Kolyshkin <k...@openvz.org>
---
 templates/fedora/config/install-post |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/templates/fedora/config/install-post 
b/templates/fedora/config/install-post
index 5be68e2..31d132b 100755
--- a/templates/fedora/config/install-post
+++ b/templates/fedora/config/install-post
@@ -7,7 +7,7 @@ set -o nounset
 
 read_vzpkg_conf
 
-if test -n "$YUM_REPO"; then
+if test -n "${$YUM_REPO:-}"; then
        for repo in $VE_ROOT/etc/yum.repos.d/*.repo; do
                mv $repo $repo.disabled
        done
-- 
1.5.6.5

_______________________________________________
Users mailing list
Users@openvz.org
https://openvz.org/mailman/listinfo/users

Reply via email to