mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 07:01:54 +00:00
nixos-enter: Check whether --root denotes a NixOS installation
This commit is contained in:
parent
f0979ca30e
commit
bb030ece3b
@ -45,6 +45,11 @@ while [ "$#" -gt 0 ]; do
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ ! -e $mountPoint/etc/NIXOS ]]; then
|
||||
echo "$0: '$mountPoint' is not a NixOS installation" >&2
|
||||
exit 126
|
||||
fi
|
||||
|
||||
mkdir -m 0755 -p "$mountPoint/dev"
|
||||
mount --rbind /dev "$mountPoint/dev"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user