From 89dd7b0f6923aee45f14e7dfd863f15482ac4b14 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 26 Mar 2013 12:18:57 -0400 Subject: [PATCH] Revert "Don't mount /nix/store ro if it's a mountpoint" Now that nixUnstable supports remounting in the "/nix/store is a mountpoint" case, this is no longer necessary. This reverts commit f1d48aec43947e5dddae8ba02e3133ee8d0d0ff9. Signed-off-by: Shea Levy --- modules/system/boot/readonly-mountpoint.c | 2 +- modules/system/boot/stage-2-init.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/boot/readonly-mountpoint.c b/modules/system/boot/readonly-mountpoint.c index 27b666873821..605adfafabb0 100644 --- a/modules/system/boot/readonly-mountpoint.c +++ b/modules/system/boot/readonly-mountpoint.c @@ -8,7 +8,7 @@ int main(int argc, char ** argv) { fprintf(stderr, "Usage: %s PATH", argv[0]); exit(2); } - if (statvfs(argv[1], &stat) != 0) { + if(statvfs(argv[1], &stat) != 0) { perror("statvfs"); exit(3); } diff --git a/modules/system/boot/stage-2-init.sh b/modules/system/boot/stage-2-init.sh index deacedb18e3e..6e23052e61d1 100644 --- a/modules/system/boot/stage-2-init.sh +++ b/modules/system/boot/stage-2-init.sh @@ -51,7 +51,7 @@ echo "booting system configuration $systemConfig" > /dev/kmsg chown 0:30000 /nix/store chmod 1775 /nix/store if [ -n "@readOnlyStore@" ]; then - if ! mountpoint /nix/store; then + if ! readonly-mountpoint /nix/store; then mount --bind /nix/store /nix/store mount -o remount,ro,bind /nix/store fi