diff options
author | unknown <unknown> | 2003-07-28 18:44:21 +0000 |
---|---|---|
committer | unknown <unknown> | 2003-07-28 18:44:21 +0000 |
commit | fe6e904cb5b6484d2087341d4188de84465ecdb7 (patch) | |
tree | 5f1851233b7561becaff639a07c26450d0763cb4 /dh_installinit | |
parent | 63e45075003b1d9fcff097b5644a81131c346653 (diff) | |
download | debhelper-version_0.17.tar.gz |
r760: This commit was manufactured by cvs2svn to create tagversion_0.17
'upstream_version_0_17'.
Diffstat (limited to 'dh_installinit')
-rwxr-xr-x | dh_installinit | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/dh_installinit b/dh_installinit deleted file mode 100755 index c43d24d9..00000000 --- a/dh_installinit +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/perl -w -# -# Install debian/init[.d], and set up the postinst and postrm for init -# scripts. - -BEGIN { push @INC, "debian", "/usr/share/debhelper" } -use Dh_Lib; -init(); - -foreach $PACKAGE (@{$dh{DOPACKAGES}}) { - $TMP=tmpdir($PACKAGE); - - # Figure out what filename to install it as. - my $script; - if ($dh{D_FLAG}) { - # -d on the command line sets D_FLAG. We will - # remove a trailing 'd' from the package name and - # use that as the name. - $script=$PACKAGE; - if ($script=~m/(.*)d$/) { - $script=$1; - } - else { - warning("\"$PACKAGE\" has no final d' in its name, but -d was specified."); - } - } - elsif ($dh{INIT_SCRIPT}) { - $script=$dh{INIT_SCRIPT}; - } - else { - $script=$PACKAGE; - } - - $init=pkgfile($PACKAGE,$script) || pkgfile($PACKAGE,"init") || - pkgfile($PACKAGE,"init.d"); - - if ($init ne '') { - if (! -d "$TMP/etc/init.d") { - doit("install","-d","$TMP/etc/init.d"); - } - - doit("install","-p","-m755",$init,"$TMP/etc/init.d/$script"); - - # This is set by the -u "foo" command line switch, it's - # the parameters to pass to update-rc.d. If not set, - # we have to say "defaults". - my $params=''; - if (defined($dh{U_PARAMS})) { - $params=join(' ',@{$dh{U_PARAMS}}); - } - if ($params eq '') { - $params="defaults"; - } - - if (! $dh{NOSCRIPTS}) { - # -r on the command line sets R_FLAG. If it's set, there - # is no restart on upgrade. - if ($dh{R_FLAG}) { - autoscript($PACKAGE,"postinst","postinst-init-norestart", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - autoscript($PACKAGE,"postrm","postrm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - } - else { - autoscript($PACKAGE,"postinst","postinst-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - autoscript($PACKAGE,"postrm","postrm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - autoscript($PACKAGE,"prerm","prerm-init", - "s/#SCRIPT#/$script/;s/#INITPARMS#/$params/"); - } - } - } -} |