26
by Colin Watson
* Resynchronise with Debian. Remaining changes: |
1 |
#!/usr/bin/perl -w
|
2 |
||
3 |
=head1 NAME
|
|
4 |
||
5 |
dh_installifupdown - install if-up and if-down hooks
|
|
6 |
||
7 |
=cut
|
|
8 |
||
9 |
use strict; |
|
10 |
use Debian::Debhelper::Dh_Lib; |
|
11 |
||
12 |
=head1 SYNOPSIS
|
|
13 |
||
14 |
B<dh_installifupdown> [S<I<debhelper options>>] [B<--name=>I<name>]
|
|
15 |
||
16 |
=head1 DESCRIPTION
|
|
17 |
||
1.4.21
by Joey Hess, Joey Hess, Valery Perrin
[ Joey Hess ] |
18 |
B<dh_installifupdown> is a debhelper program that is responsible for installing
|
19 |
F<if-up>, F<if-down>, F<if-pre-up>, and F<if-post-down> hook scripts into package build
|
|
26
by Colin Watson
* Resynchronise with Debian. Remaining changes: |
20 |
directories.
|
21 |
||
1.1.9
by Joey Hess, Steve Langasek, Joey Hess
[ Steve Langasek ] |
22 |
=head1 FILES
|
23 |
||
24 |
=over 4
|
|
25 |
||
26 |
=item debian/I<package>.if-up
|
|
27 |
||
28 |
=item debian/I<package>.if-down
|
|
29 |
||
30 |
=item debian/I<package>.if-pre-up
|
|
31 |
||
32 |
=item debian/I<package>.if-post-down
|
|
33 |
||
34 |
These files are installed into etc/network/if-*.d/I<package> in
|
|
35 |
the package build directory.
|
|
36 |
||
37 |
=back
|
|
26
by Colin Watson
* Resynchronise with Debian. Remaining changes: |
38 |
|
39 |
=head1 OPTIONS
|
|
40 |
||
41 |
=over 4
|
|
42 |
||
43 |
=item B<--name=>I<name>
|
|
44 |
||
1.4.21
by Joey Hess, Joey Hess, Valery Perrin
[ Joey Hess ] |
45 |
Look for files named F<debian/package.name.if-*> and install them as
|
46 |
F<etc/network/if-*/name>, instead of using the usual files and installing them
|
|
26
by Colin Watson
* Resynchronise with Debian. Remaining changes: |
47 |
as the package name.
|
48 |
||
49 |
=back
|
|
50 |
||
51 |
=cut
|
|
52 |
||
53 |
init(); |
|
54 |
||
1.4.58
by Joey Hess
* dh: Skips running commands that it can tell will do nothing. |
55 |
# PROMISE: DH NOOP WITHOUT if-pre-up if-up if-down if-post-down
|
56 |
||
26
by Colin Watson
* Resynchronise with Debian. Remaining changes: |
57 |
foreach my $package (@{$dh{DOPACKAGES}}) { |
58 |
my $tmp=tmpdir($package); |
|
59 |
||
60 |
foreach my $script (qw(pre-up up down post-down)) { |
|
61 |
my $file=pkgfile($package, "if-$script"); |
|
62 |
if ($file ne '') { |
|
63 |
if (! -d "$tmp/etc/network/if-$script.d") { |
|
64 |
doit("install","-d","$tmp/etc/network/if-$script.d"); |
|
65 |
}
|
|
66 |
doit("install","-p","-m755",$file,"$tmp/etc/network/if-$script.d/".pkgfilename($package)); |
|
67 |
}
|
|
68 |
}
|
|
69 |
}
|
|
70 |
||
71 |
=head1 SEE ALSO
|
|
72 |
||
73 |
L<debhelper(7)>
|
|
74 |
||
75 |
This program is a part of debhelper.
|
|
76 |
||
77 |
=head1 AUTHOR
|
|
78 |
||
79 |
Joey Hess <joeyh@debian.org>
|
|
80 |
||
81 |
=cut
|