diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2018-05-30 15:44:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-30 15:44:43 +0200 |
commit | 3be58fe1bc781fd39649f616c8ba4e5be672d505 (patch) | |
tree | 86df931088c2b5a19a8f9fa4ca635c220bcad864 | |
parent | f9940f47b36df396799d90c3ff691a1ef0c45c35 (diff) | |
parent | 6ba1726eeb58cd8e7d69e2a090346f26fdf634a5 (diff) |
Merge pull request #2194 from grahamc/nix-profile-daemon-profile-set-u
Nix profile & installation: handle set -u installations
-rw-r--r-- | scripts/install-multi-user.sh | 2 | ||||
-rw-r--r-- | scripts/nix-profile-daemon.sh.in | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/install-multi-user.sh b/scripts/install-multi-user.sh index b4eec2fe9..6ee8dd485 100644 --- a/scripts/install-multi-user.sh +++ b/scripts/install-multi-user.sh @@ -727,7 +727,7 @@ setup_default_profile() { _sudo "to installing a bootstrapping Nix in to the default Profile" \ HOME="$ROOT_HOME" "$NIX_INSTALLED_NIX/bin/nix-env" -i "$NIX_INSTALLED_NIX" - if [ -z "$NIX_SSL_CERT_FILE" ] || ! [ -f "$NIX_SSL_CERT_FILE" ]; then + if [ -z "${NIX_SSL_CERT_FILE:-}" ] || ! [ -f "${NIX_SSL_CERT_FILE:-}" ]; then _sudo "to installing a bootstrapping SSL certificate just for Nix in to the default Profile" \ HOME="$ROOT_HOME" "$NIX_INSTALLED_NIX/bin/nix-env" -i "$NIX_INSTALLED_CACERT" export NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in index 52070e36a..1be9a0755 100644 --- a/scripts/nix-profile-daemon.sh.in +++ b/scripts/nix-profile-daemon.sh.in @@ -1,5 +1,5 @@ # Only execute this file once per shell. -if [ -n "$__ETC_PROFILE_NIX_SOURCED" ]; then return; fi +if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi __ETC_PROFILE_NIX_SOURCED=1 # Set up secure multi-user builds: non-root users build through the @@ -51,7 +51,7 @@ fi # Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work. -if [ ! -z "$NIX_SSL_CERT_FILE" ]; then +if [ ! -z "${NIX_SSL_CERT_FILE:-}" ]; then : # Allow users to override the NIX_SSL_CERT_FILE elif [ -e /etc/ssl/certs/ca-certificates.crt ]; then # NixOS, Ubuntu, Debian, Gentoo, Arch export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt |