From a34ec1517fc76dca1d3aa1cd3f04a04ef4109753 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Thu, 29 Sep 2016 23:17:53 +0300 Subject: 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. --- nixos/modules/installer/tools/nixos-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/installer') 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 -- cgit 1.4.1