]> git.donarmstrong.com Git - debhelper.git/blobdiff - dh_installinit
releasing version 7.4.16
[debhelper.git] / dh_installinit
index f870e99d60fb2b17d016eab53cf382133463b404..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
 
-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.
+Otherwise, if this exists, it is installed
+into etc/init.d/I<package> in the package build directory.
+
+=item debian/I<package>.default
+
+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}) {
@@ -191,9 +200,9 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
        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");
@@ -209,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;
                }