X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=dh_installinit;h=c053132ed10ba6fb5d56525c8151ac79ff81307c;hb=3358de78fe59904aab34abdb4948ec8e9b19d171;hp=edebeaf44cc8d9bf98333e457d00c7bdddf42ede;hpb=5afc32c767432aa6b5842593e883397a905efc5f;p=debhelper.git diff --git a/dh_installinit b/dh_installinit index edebeaf..c053132 100755 --- a/dh_installinit +++ b/dh_installinit @@ -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.upstart + +If this exists, it is installed into etc/init/I.conf in the package +build directory. + +=item debian/I.init + +Otherwise, if this exists, it is installed +into etc/init.d/I in the package build directory. + +=item debian/I.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 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 + Steve Langasek =cut