]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installinit
Drop tests previously written for dpkg-buildpackage -jX detection.
[debhelper.git] / dh_installinit
index edebeaf44cc8d9bf98333e457d00c7bdddf42ede..c053132ed10ba6fb5d56525c8151ac79ff81307c 100755 (executable)
@@ -24,17 +24,26 @@ It also automatically generates the postinst and postrm and prerm commands
 needed to set up the symlinks in /etc/rc*.d/ and to start and stop the init
 scripts.
 
-If a file named debian/package.upstart exists, then it is installed into
-etc/init/package.conf in the package build directory, with "package" replaced
-by the package name.
+=head1 FILES
 
-Otherwise, if a file named debian/package.init exists, then it is installed
-into etc/init.d/package in the package build directory, with "package"
-replaced by the package name.
+=over 4
+
+=item debian/I<package>.upstart
+
+If this exists, it is installed into etc/init/I<package>.conf in the package
+build directory.
+
+=item debian/I<package>.init
+
+Otherwise, if this exists, it is installed
+into etc/init.d/I<package> in the package build directory.
+
+=item debian/I<package>.default
 
-If a file named debian/package.default exists, then it is installed into
-etc/default/package in the package build directory, with "package" replaced
-by the package name.
+If this exists, it is installed into etc/default/I<package> in the package
+build directory.
+
+=back
 
 =head1 OPTIONS
 
@@ -168,7 +177,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        }       
        
        my $job=pkgfile($package,"upstart");
-       my ($init,$default) = ('','');
+       my $init='';
 
        if ($job ne '' || ($dh{ONLYSCRIPTS} && -e "$tmp/etc/init/$jobfile.conf")) {
                if (! $dh{ONLYSCRIPTS}) {
@@ -187,12 +196,13 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        doit("install","-d","$tmp/etc/init.d");
                }
                doit("ln","-sf","/lib/init/upstart-job","$tmp/etc/init.d/$jobfile");
-       } else {
+       }
+       else {
                $init=pkgfile($package,$script) || pkgfile($package,"init") ||
                        pkgfile($package,"init.d");
-               $default=pkgfile($package,'default');
        }
 
+       my $default=pkgfile($package,'default');
        if ($default ne '' && ! $dh{ONLYSCRIPTS}) {
                if (! -d "$tmp/etc/default") {
                        doit("install","-d","$tmp/etc/default");
@@ -208,8 +218,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                doit("install","-p","-m755",$init,"$tmp/etc/init.d/$script");
        }
 
-       if ($job ne '' || $init ne '' || $dh{ONLYSCRIPTS})
-       {
+       if ($job ne '' || $init ne '' || $dh{ONLYSCRIPTS}) {
                if (-e "$tmp/etc/init/$jobfile.conf") {
                        $script=$jobfile;
                }
@@ -224,7 +233,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                if ($params eq '') {
                        $params="defaults";
                }
-                
+               
                if (! $dh{NOSCRIPTS}) {
                        if (! $dh{NO_START}) {
                                if ($dh{RESTART_AFTER_UPGRADE}) {
@@ -272,6 +281,7 @@ This program is a part of debhelper.
 =head1 AUTHORS
 
 Joey Hess <joeyh@debian.org>
+
 Steve Langasek <steve.langasek@canonical.com>
 
 =cut