about summary refs log tree commit diff
path: root/nixos/modules/installer/tools
diff options
context:
space:
mode:
authorobadz <obadz-git@obadz.com>2018-03-04 15:56:38 +0000
committerobadz <obadz-git@obadz.com>2018-03-04 16:19:52 +0000
commit80ea345494b8411902ad41fa2bdc9b31a8dadc36 (patch)
tree097b1026f6dd5ccc141ca0205994750c0d7572f6 /nixos/modules/installer/tools
parent7af0aa846ee3f06d40153204f261bc189e06da67 (diff)
downloadnixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar.gz
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar.bz2
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar.lz
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar.xz
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.tar.zst
nixlib-80ea345494b8411902ad41fa2bdc9b31a8dadc36.zip
nixos-enter: specify absolute path to bash
Not doing so makes it impossible to use nixos-enter from a non-NixOS
distro
Diffstat (limited to 'nixos/modules/installer/tools')
-rw-r--r--nixos/modules/installer/tools/nixos-enter.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/installer/tools/nixos-enter.sh b/nixos/modules/installer/tools/nixos-enter.sh
index 122d9fdcd29b..679391189612 100644
--- a/nixos/modules/installer/tools/nixos-enter.sh
+++ b/nixos/modules/installer/tools/nixos-enter.sh
@@ -15,8 +15,8 @@ else
 fi
 
 mountPoint=/mnt
-command=("bash" "--login")
 system=/nix/var/nix/profiles/system
+command=($system/sw/bin/bash "--login")
 
 while [ "$#" -gt 0 ]; do
     i="$1"; shift 1
@@ -32,7 +32,7 @@ while [ "$#" -gt 0 ]; do
             exit 1
             ;;
         --command|-c)
-            command=("bash" "-c" "$1")
+            command=($system/sw/bin/bash "-c" "$1")
             shift 1
             ;;
         --)