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
|
esac
|
||||||
done
|
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"
|
mkdir -m 0755 -p "$mountPoint/dev"
|
||||||
mount --rbind /dev "$mountPoint/dev"
|
mount --rbind /dev "$mountPoint/dev"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user