modules/system/boot/stage-1-init.sh: added "boot.runSize" option to determine the maximum size of the /run tmpfs
svn path=/nixos/trunk/; revision=29245
This commit is contained in:
parent
c01c41e2da
commit
d3528a3c4e
@ -55,7 +55,7 @@ mkdir -p /sys
|
||||
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.
|
||||
|
@ -282,7 +282,7 @@ let
|
||||
|
||||
inherit udevConf extraUtils;
|
||||
|
||||
inherit (config.boot) resumeDevice devSize;
|
||||
inherit (config.boot) resumeDevice devSize runSize;
|
||||
|
||||
inherit (config.boot.initrd) checkJournalingFS
|
||||
postDeviceCommands postMountCommands kernelModules;
|
||||
|
@ -126,7 +126,7 @@ rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
|
||||
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
|
||||
|
@ -32,6 +32,14 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
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 @@ let
|
||||
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 =
|
||||
|
Loading…
Reference in New Issue
Block a user