Import Debian changes 1.8.5-1
[hcoop/debian/openafs.git] / debian / ConfigUtils.pm
CommitLineData
b7cfede0
BK
1# This is -*- perl -*-
2
3package Debian::OpenAFS::ConfigUtils;
4
5use strict;
6use vars qw( @ISA @EXPORT @unwinds);
7@ISA = qw(Exporter);
8require Exporter;
9@EXPORT = qw(@unwinds run unwind);
10
11sub run ($) {
12 print join(' ', @_);
13 print "\n";
14 system (@_) == 0
15 or die "Failed: $?\n";
16}
17
18# This subroutine takes a command to run in case of failure. After
19# each succesful step, this routine should be run with a command to
20# undo the successful step.
21
22 sub unwind($) {
23 push @unwinds, $_[0];
24 }
25
261;