Author: simons
Date: Tue Sep 13 18:49:47 2011
New Revision: 29245
URL: https://ssl.nixos.org/websvn/nix/?rev=29245&sc=1
Log:
modules/system/boot/stage-1-init.sh: added "boot.runSize" option to determine
the maximum size of the /run tmpfs
Modified:
nixos/trunk/modules/system/boot/stage-1-init.sh
nixos/trunk/modules/system/boot/stage-1.nix
nixos/trunk/modules/system/boot/stage-2-init.sh
nixos/trunk/modules/system/boot/stage-2.nix
Modified: nixos/trunk/modules/system/boot/stage-1-init.sh
==============================================================================
--- nixos/trunk/modules/system/boot/stage-1-init.sh Tue Sep 13 17:50:03
2011 (r29244)
+++ nixos/trunk/modules/system/boot/stage-1-init.sh Tue Sep 13 18:49:47
2011 (r29245)
@@ -55,7 +55,7 @@
mount -t sysfs none /sys
mount -t tmpfs -o "mode=0755,size=@devSize@" none /dev
mkdir -p /run
-mount -t tmpfs none /run
+mount -t tmpfs -o "mode=1777,size=@runSize@" none /run
# Process the kernel command line.
Modified: nixos/trunk/modules/system/boot/stage-1.nix
==============================================================================
--- nixos/trunk/modules/system/boot/stage-1.nix Tue Sep 13 17:50:03 2011
(r29244)
+++ nixos/trunk/modules/system/boot/stage-1.nix Tue Sep 13 18:49:47 2011
(r29245)
@@ -282,7 +282,7 @@
inherit udevConf extraUtils;
- inherit (config.boot) resumeDevice devSize;
+ inherit (config.boot) resumeDevice devSize runSize;
inherit (config.boot.initrd) checkJournalingFS
postDeviceCommands postMountCommands kernelModules;
Modified: nixos/trunk/modules/system/boot/stage-2-init.sh
==============================================================================
--- nixos/trunk/modules/system/boot/stage-2-init.sh Tue Sep 13 17:50:03
2011 (r29244)
+++ nixos/trunk/modules/system/boot/stage-2-init.sh Tue Sep 13 18:49:47
2011 (r29245)
@@ -126,7 +126,7 @@
if ! mountpoint -q /run; then
rm -rf /run
mkdir -m 0755 -p /run
- mount -t tmpfs -o "mode=755" none /run
+ mount -t tmpfs -o "mode=1777,size=@runSize@" none /run
fi
mkdir -m 0700 -p /run/lock
Modified: nixos/trunk/modules/system/boot/stage-2.nix
==============================================================================
--- nixos/trunk/modules/system/boot/stage-2.nix Tue Sep 13 17:50:03 2011
(r29244)
+++ nixos/trunk/modules/system/boot/stage-2.nix Tue Sep 13 18:49:47 2011
(r29245)
@@ -32,6 +32,14 @@
'';
};
+ runSize = pkgs.lib.mkOption {
+ default = "50%";
+ example = "256m";
+ description = ''
+ Size limit for the /run tmpfs. Look at mount(8), tmpfs size option,
+ for the accepted syntax.
+ '';
+ };
};
};
@@ -43,7 +51,7 @@
src = ./stage-2-init.sh;
isExecutable = true;
inherit kernel;
- inherit (config.boot) devShmSize;
+ inherit (config.boot) devShmSize runSize;
ttyGid = config.ids.gids.tty;
upstart = config.system.build.upstart;
path =
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits