File: ConfigUtils.pm

package info (click to toggle)
openafs 1.8.14-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 42,972 kB
  • sloc: ansic: 455,934; xml: 66,858; perl: 11,967; makefile: 10,038; sh: 7,955; objc: 6,354; java: 5,638; cpp: 2,268; asm: 1,214; yacc: 441; tcl: 249; lex: 201; csh: 85
file content (26 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This is -*- perl -*-

package Debian::OpenAFS::ConfigUtils;

use strict;
use vars qw( @ISA @EXPORT @unwinds);
@ISA = qw(Exporter);
require Exporter;
@EXPORT = qw(@unwinds run unwind);

sub run ($) {
  print join(' ', @_);
  print "\n";
  system (@_)  == 0
    or die "Failed: $?\n";
}

# This subroutine takes a command to run in case of failure.  After
# each succesful step, this routine should be run with a command to
# undo the successful step.

	 sub unwind($) {
	   push @unwinds, $_[0];
	 }

1;