about summary refs log tree commit diff
path: root/nixos/modules/installer
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-09-29 23:17:53 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-09-29 23:17:53 +0300
commita34ec1517fc76dca1d3aa1cd3f04a04ef4109753 (patch)
tree81e401ab7aed9ea028874fa1c91badbfe00222cc /nixos/modules/installer
parentfcc1eb6f1cedafe5723fc4e669c39c13fa9b93bf (diff)
downloadnixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar.gz
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar.bz2
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar.lz
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar.xz
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.tar.zst
nixlib-a34ec1517fc76dca1d3aa1cd3f04a04ef4109753.zip
nixos-install: Bug fix for root password not being asked
Since some changes to the setuid wrappers, there is a symlink involved
and it doesn't resolve correctly inside the chroot. Do the check inside
the chroot to make it work again.
Diffstat (limited to 'nixos/modules/installer')
-rw-r--r--nixos/modules/installer/tools/nixos-install.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/installer/tools/nixos-install.sh b/nixos/modules/installer/tools/nixos-install.sh
index 0a452b86018a..da28c027c563 100644
--- a/nixos/modules/installer/tools/nixos-install.sh
+++ b/nixos/modules/installer/tools/nixos-install.sh
@@ -259,7 +259,7 @@ chroot $mountPoint /nix/var/nix/profiles/system/activate
 
 
 # Ask the user to set a root password.
-if [ -z "$noRootPasswd" ] && [ -x $mountPoint/var/setuid-wrappers/passwd ] && [ -t 0 ]; then
+if [ -z "$noRootPasswd" ] && chroot $mountPoint [ -x /var/setuid-wrappers/passwd ] && [ -t 0 ]; then
     echo "setting root password..."
     chroot $mountPoint /var/setuid-wrappers/passwd
 fi