From ee829cb60b411c50dfcf5aaebceb4d98eec46ccd Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 12 Apr 2013 12:36:52 +0100 Subject: [PATCH] Don't let the script fail if `PACKAGESITE` is not set. Refs #107. --- ChangeLog | 6 ++++++ bootstrap-salt.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 03f0cee..96ed3ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Version 1.5.X: + * Distro Support Fixed: + * FreeBSD (Don't let the script fail if PACKAGESITE is not + set) + + Version 1.5.3: * Return 0 or 1 from functions * Convert several pipes into a single awk call diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 9429460..a4741c3 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -1846,11 +1846,17 @@ __freebsd_get_packagesite() { BSD_ARCH="x86:32" fi + # Since the variable might not be set, don't, momentarily treat it as a failure + set +o nounset + if [ "x${PACKAGESITE}" = "x" ]; then echowarn "The environment variable PACKAGESITE is not set." echowarn "The installation will, most likely fail since pkgbeta.freebsd.org does not yet contain any packages" fi BS_PACKAGESITE=${PACKAGESITE:-"http://pkgbeta.freebsd.org/freebsd:${DISTRO_MAJOR_VERSION}:${BSD_ARCH}/latest"} + + # Treat unset variables as errors once more + set -o nounset } install_freebsd_9_stable_deps() {