Handle hostnames with upper-case letters
[webmin.git] / fdisk / relabel.cgi
1 #!/usr/local/bin/perl
2 # Re-write the partition table
3
4 require './fdisk-lib.pl';
5 &ReadParse();
6 &can_edit_disk($in{'device'}) || &error($text{'disk_ecannot'});
7
8 # Get the disk
9 @disks = &list_disks_partitions();
10 ($d) = grep { $_->{'device'} eq $in{'device'} } @disks;
11 $d || &error($text{'disk_egone'});
12
13 # Wipe the partition
14 &set_partition_table($d->{'device'}, $in{'table'});
15 &redirect("edit_disk.cgi?device=$in{'device'}");