# LIVE is the same as LOWER then skip the overlay; just assume
# a proper chroot system exists at LIVE.
if [ "$LIVE" != "$LOWER" ] ; then
- # setup $UPPER/run
- mkdir -p "$UPPER/run"
- mount -t tmpfs -osize=100M tmpfs "$UPPER/run"
- mkdir -p "$UPPER/run/lock"
+ # sanity check
+ [ -d "$WORK" ] || die "WORK=$WORK is not a directory"
+ [ -d "$UPPER" ] || die "UPPER=$UPPER is not a directory"
+ [ -d "$LOWER" ] || die "LOWER=LOWPER is not a directory"
+ [ -d "$LIVE" ] || die "LOWER=LOWPER is not a directory"
# setup $UPPER/dev
mkdir -p "$UPPER/dev"
- mount -t tmpfs -osize=100M tmpfs "$UPPER/dev"
+ mount -t tmpfs -osize=50M tmpfs "$UPPER/dev"
mknod -m 622 "$UPPER/dev/console" c 5 1
mknod -m 666 "$UPPER/dev/null" c 1 3
mknod -m 666 "$UPPER/dev/zero" c 1 5