From c8ef5989452e191a1d345cd006f54305cb989af6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 11 May 2015 15:59:11 +0200 Subject: stage-1: Don't mount /dev/shm if it's already mounted --- nixos/modules/system/boot/stage-2-init.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nixos/modules/system/boot') diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index 173453a17f71..330e2f97c5bf 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -85,8 +85,10 @@ done # More special file systems, initialise required directories. -mkdir -m 0755 /dev/shm -mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm +if ! mountpoint -q /dev/shm; then + mkdir -m 0755 /dev/shm + mount -t tmpfs -o "rw,nosuid,nodev,size=@devShmSize@" tmpfs /dev/shm +fi mkdir -m 0755 -p /dev/pts [ -e /proc/bus/usb ] && mount -t usbfs usbfs /proc/bus/usb # UML doesn't have USB by default mkdir -m 01777 -p /tmp -- cgit 1.4.1