From 0b0fbb54a3b89112f3be4aad0f983f8752ee3ff8 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 19 Sep 2012 21:02:35 +0000 Subject: Mount /dev/shm as tmpfs --- iurt_root_command | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'iurt_root_command') diff --git a/iurt_root_command b/iurt_root_command index 90abf38..1843269 100755 --- a/iurt_root_command +++ b/iurt_root_command @@ -143,6 +143,10 @@ $run{todo} = []; "bind mount source on dest", \&bindmount, "Bind mounting" ], + [ "", "tmpfs", 1, "", + "mount a tmpfs on the given directory", + \&tmpfs, "Mount tmpfs" ], + [ "", "umount", 1, "", "umount the given directory", \&umount, "Unmounting" ], @@ -421,6 +425,12 @@ sub bindmount { return 1; } +sub tmpfs { + my ($_run, $dir) = @_; + check_path_authorized($dir) or return; + return !system("mount", "none", "-t", "tmpfs", $dir); +} + sub umount { my ($_run, $dir) = @_; check_path_authorized($dir) or return; -- cgit v1.2.1