From 8b15942db0eff012fbe58e5ecc9d5bb927f18543 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Wed, 23 Sep 2009 12:17:51 +0000 Subject: make it possible to specify mount options for tmpfs mounts (should it be done for other FS types ?) --- lib/MDV/Draklive/Loopback.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/MDV/Draklive/Loopback.pm b/lib/MDV/Draklive/Loopback.pm index 6280043..4429574 100644 --- a/lib/MDV/Draklive/Loopback.pm +++ b/lib/MDV/Draklive/Loopback.pm @@ -114,7 +114,8 @@ our %loop_types; mount => sub { my ($live, $dir) = @_; my $mnt = $live->{prefix}{live}{mnt} . $dir->{mountpoint}; - my $cmd = "mount -t tmpfs $mnt $mnt"; + my $mount_opts = $dir->{mount_opts}?"-o $dir->{mount_opts}":""; + my $cmd = "mount -t tmpfs $mount_opts $mnt $mnt"; $dir->{fallback} ? qq(sh -c 'if ! grep -q " $mnt " /proc/mounts; then $cmd; fi') : $cmd; }, }, -- cgit v1.2.1