- my $uselist = new File::UseList(listfile => $config{'uselist_file'},
- lockfile => $config{'lock_file'},
- timeout => $config{'lock_timeout'});
+ my $uselist = new File::UseList(listfile => $config->{'uselist_file'},
+ lockfile => $config->{'lock_file'},
+ timeout => $config->{'lock_timeout'});
- $uselist->lock or abort("Locking of $config{'uselist_file'} failed. Try it again in a moment. If the problem persists, ask someone to recreate the lock file ($config{'lock_file'}).");
+ $uselist->lock or abort($config->{'errors'}->{'lock_failed'},{USELIST => $config->{'uselist_file'}, LOCK_FILE => $config->{'lock_file'}});
$uselist->load;
# Create a hash with data submitted by user
$uselist->load;
# Create a hash with data submitted by user
- # (the CGI and the File::UseList object will also be included)
+ # (some other necessary information will also be included)
my %data = (physical => $physical,
virtual => $virtual,
new_physical => $new_physical,
new_virtual => $new_virtual,
uselist => $uselist,
my %data = (physical => $physical,
virtual => $virtual,
new_physical => $new_physical,
new_virtual => $new_virtual,
uselist => $uselist,
- cgi => $cgi);
+ cgi => $cgi,
+ version => $VERSION,
+ configfile => CONFIGFILE);
- my $output = exec_command($command,\%data,\%config); # Execute the command...
+ my $output = exec_command($command,\%data,$config); # Execute the command...
$uselist->unlock; # ... unlock the list with files in use...
print $$output; # ... and print the output of the command
}
else
{
$uselist->unlock; # ... unlock the list with files in use...
print $$output; # ... and print the output of the command
}
else
{
- abort("Accessing files and directories above the virtual root directory is forbidden.");