]> git.donarmstrong.com Git - debhelper.git/blob - dh_installifupdown
Updated French man page translation. Closes: #685560
[debhelper.git] / dh_installifupdown
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
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
20 directories.
21
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
38
39 =head1 OPTIONS
40
41 =over 4
42
43 =item B<--name=>I<name>
44
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
47 as the package name.
48
49 =back
50
51 =cut
52
53 init();
54
55 foreach my $package (@{$dh{DOPACKAGES}}) {
56         my $tmp=tmpdir($package);
57         
58         foreach my $script (qw(pre-up up down post-down)) {
59                 my $file=pkgfile($package, "if-$script");
60                 if ($file ne '') {
61                         if (! -d "$tmp/etc/network/if-$script.d") {
62                                 doit("install","-d","$tmp/etc/network/if-$script.d");
63                         }
64                         doit("install","-p","-m755",$file,"$tmp/etc/network/if-$script.d/".pkgfilename($package));
65                 }
66         }
67 }
68
69 =head1 SEE ALSO
70
71 L<debhelper(7)>
72
73 This program is a part of debhelper.
74
75 =head1 AUTHOR
76
77 Joey Hess <joeyh@debian.org>
78
79 =cut