mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Add cgi args parser
This commit is contained in:
21
mount/cgi_args.pl
Normal file
21
mount/cgi_args.pl
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
do 'mount-lib.pl';
|
||||
|
||||
sub cgi_args
|
||||
{
|
||||
my ($cgi) = @_;
|
||||
if ($cgi eq 'edit_mount.cgi') {
|
||||
# Find root filesystem, or first mount
|
||||
my @mounts = &list_mounts();
|
||||
return 'none' if (!@mounts);
|
||||
my $i = 0;
|
||||
foreach my $m (@mounts) {
|
||||
if ($m->[0] eq '/') {
|
||||
return 'index='.$i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
return 'index=0';
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
Reference in New Issue
Block a user