Merge branch 'stage2-generalise-containers' of https://github.com/rickynils/nixpkgs

This commit is contained in:
Shea Levy 2016-09-07 05:39:22 -04:00
commit 03b888e205

View file

@ -29,14 +29,14 @@ setPath "@path@"
# Normally, stage 1 mounts the root filesystem read/writable.
# However, in some environments, stage 2 is executed directly, and the
# root is read-only. So make it writable here.
if [ "$container" != systemd-nspawn ]; then
if [ -z "$container" ]; then
mount -n -o remount,rw none /
fi
# Likewise, stage 1 mounts /proc, /dev and /sys, so if we don't have a
# stage 1, we need to do that here.
if [ ! -e /proc/1 ]; then
if [ ! -e /proc/1 ] || [ -n "$container" ]; then
specialMount() {
local device="$1"
local mountPoint="$2"