aboutsummaryrefslogtreecommitdiffstats
path: root/iurt_root_command
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-01 22:47:07 +0000
committerOlivier Blin <blino@mageia.org>2010-11-01 22:47:07 +0000
commit1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e (patch)
tree0a887bb3c10c20a957be25aea0c26b3764a1e77b /iurt_root_command
parentaa87be3b3fb9248b7c3dc33e7c8f9a2bfb62e14a (diff)
downloadiurt-1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e.tar
iurt-1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e.tar.gz
iurt-1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e.tar.bz2
iurt-1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e.tar.xz
iurt-1614ac3ea4d9c58b7ba2bf4fc1f98d7cb128325e.zip
add umount (to be protected)
Diffstat (limited to 'iurt_root_command')
-rwxr-xr-xiurt_root_command8
1 files changed, 8 insertions, 0 deletions
diff --git a/iurt_root_command b/iurt_root_command
index 6c79126..de21741 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -134,6 +134,9 @@ $run{todo} = [];
], "<file> <directory> [files]",
"Uncompress tarball",
\&untar, "Uncompress tarball" ],
+ [ "", "umount", 1, "<directory>]",
+ "umount the given directory",
+ \&umount, "Unmounting" ],
);
open(my $LOG, ">&STDERR");
@@ -344,3 +347,8 @@ sub untar {
mkdir_p($dir);
return !system('tar', 'xf', $file, '-C', $dir, @o_files);
}
+
+sub umount {
+ my ($_run, $dir) = @_;
+ return !system("umount", $dir);
+}