1#!/usr/local/bin/perl
2# unmount.cgi
3# Unmount a currently mounted filesystem
4
5require './mount-lib.pl';
6&ReadParse();
7
8@mounts = &list_mounted();
9$mount = $mounts[$in{'index'}];
10&error_setup(&text('unmount_err', $mount->[0]));
11&can_edit_fs(@$mount) || &error($text{'edit_ecannot'});
12$err = &unmount_dir(@$mount);
13&error($err) if ($err);
14&delete_unmounted(@$mount);
15&webmin_log("umount", undef, undef, { 'dev' => $mount->[0],
16				      'type' => $mount->[2],
17				      'dir' => $mount->[1] });
18&redirect("");
19
20