Handle hostnames with upper-case letters
[webmin.git] / quota / edgrace.pl
1 #!/usr/local/bin/perl
2 # edgrace.pl
3 # Run by edquota to edit the grace times for some filesystem
4
5 $no_acl_check++;
6 $0 =~ /^(\S+)\//;
7 chdir($1);
8 require './quota-lib.pl';
9 $fs = $ENV{'QUOTA_FILESYS'};
10 $bt = $ENV{'QUOTA_BTIME'};
11 $bu = $ENV{'QUOTA_BUNITS'};
12 $ft = $ENV{'QUOTA_FTIME'};
13 $fu = $ENV{'QUOTA_FUNITS'};
14 $f = $ARGV[0];
15
16 open(FILE, $f);
17 while(<FILE>) { $qdata .= $_; }
18 close(FILE);
19 $nqdata = &edit_grace_file($qdata, $fs, $bt, $bu, $ft, $fu);
20 open(FILE, "> $f");
21 print FILE $nqdata;
22 close(FILE);