3 package OpenAFS
::ConfigUtils
;
6 use vars
qw( @ISA @EXPORT @unwinds $debug);
9 @EXPORT = qw(@unwinds run unwind);
13 #--------------------------------------------------------------------
14 # run(cmd) - run a command. Takes a command to be executed or
15 # a perl code reference to be eval'd.
18 if (ref($cmd) eq 'CODE') {
26 print "debug: $cmd\n";
28 my $rc = system($cmd);
30 die "ERROR: Command failed: $cmd\nerror code=$?\n";
35 # This subroutine takes a command to run in case of failure. After
36 # each succesful step, this routine should be run with a command to
37 # undo the successful step.