summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/create/perform.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-12-16 13:59:31 +0000
committerjkh <jkh@FreeBSD.org>1998-12-16 13:59:31 +0000
commit14bdf1c6c014d051678254cec508ab3065989050 (patch)
treea10438d747dc77ce05c457ecf05e6feef939cda0 /usr.sbin/pkg_install/create/perform.c
parent76e92ae7047e57dd24ddfebbb87c0a80517d99c6 (diff)
downloadFreeBSD-src-14bdf1c6c014d051678254cec508ab3065989050.zip
FreeBSD-src-14bdf1c6c014d051678254cec508ab3065989050.tar.gz
Make it possible to have separate install scripts as well as have
an on-delete script. Submitted by: Rajesh Vaidheeswarran <rv@fore.com>
Diffstat (limited to 'usr.sbin/pkg_install/create/perform.c')
-rw-r--r--usr.sbin/pkg_install/create/perform.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index d68cc00..5e7443d 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,6 +1,6 @@
#ifndef lint
static const char rcsid[] =
- "$Id: perform.c,v 1.45 1998/09/11 07:26:57 jkh Exp $";
+ "$Id: perform.c,v 1.46 1998/12/05 06:28:58 asami Exp $";
#endif
/*
@@ -156,11 +156,21 @@ pkg_perform(char **pkgs)
add_plist(&plist, PLIST_IGNORE, NULL);
add_plist(&plist, PLIST_FILE, INSTALL_FNAME);
}
+ if (PostInstall) {
+ copy_file(home, PostInstall, POST_INSTALL_FNAME);
+ add_plist(&plist, PLIST_IGNORE, NULL);
+ add_plist(&plist, PLIST_FILE, POST_INSTALL_FNAME);
+ }
if (DeInstall) {
copy_file(home, DeInstall, DEINSTALL_FNAME);
add_plist(&plist, PLIST_IGNORE, NULL);
add_plist(&plist, PLIST_FILE, DEINSTALL_FNAME);
}
+ if (PostDeInstall) {
+ copy_file(home, PostDeInstall, POST_DEINSTALL_FNAME);
+ add_plist(&plist, PLIST_IGNORE, NULL);
+ add_plist(&plist, PLIST_FILE, POST_DEINSTALL_FNAME);
+ }
if (Require) {
copy_file(home, Require, REQUIRE_FNAME);
add_plist(&plist, PLIST_IGNORE, NULL);
@@ -270,8 +280,12 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist)
if (Install)
fprintf(totar, "%s\n", INSTALL_FNAME);
+ if (PostInstall)
+ fprintf(totar, "%s\n", POST_INSTALL_FNAME);
if (DeInstall)
fprintf(totar, "%s\n", DEINSTALL_FNAME);
+ if (PostDeInstall)
+ fprintf(totar, "%s\n", POST_DEINSTALL_FNAME);
if (Require)
fprintf(totar, "%s\n", REQUIRE_FNAME);
if (Display)
OpenPOWER on IntegriCloud