summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-10-14 19:11:27 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-10-14 19:11:27 +0000
commit5bb3b50645084a11234ec8384c3eb75e15b7e62f (patch)
treed7a84d195f790ef08a50241c8cf5d312da403cdc /usr.sbin/pkg_install
parent2a7488e9f01702cda3a2372955a4fcd9bacc20f5 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/create/perform.c8
-rw-r--r--usr.sbin/pkg_install/info/perform.c10
2 files changed, 11 insertions, 7 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 0c773e9c5bd7..275626b8f58f 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.26 1995/05/10 20:46:06 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.27 1995/05/10 22:33:55 jkh Exp $";
#endif
/*
@@ -31,11 +31,13 @@ static const char *rcsid = "$Id: perform.c,v 1.26 1995/05/10 20:46:06 jkh Exp $"
static void sanity_check(void);
static void make_dist(char *, char *, char *, Package *);
+static char *home;
+
int
pkg_perform(char **pkgs)
{
char *pkg = *pkgs; /* Only one arg to create */
- char *home, *cp;
+ char *cp;
FILE *pkg_in, *fp;
Package plist;
char *suffix; /* What we tack on to the end of the finished package */
@@ -268,5 +270,5 @@ sanity_check()
void
cleanup(int sig)
{
- leave_playpen();
+ leave_playpen(home);
}
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index 709420d17c85..fb23e13c984d 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.16.4.1 1995/08/30 07:49:55 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.16.4.2 1995/10/09 11:16:27 jkh Exp $";
#endif
/*
@@ -73,6 +73,8 @@ pkg_perform(char **pkgs)
return err_cnt;
}
+static char *Home;
+
static int
pkg_do(char *pkg)
{
@@ -120,7 +122,7 @@ pkg_do(char *pkg)
code = 1;
goto bail;
}
- (void)make_playpen(PlayPen, sb.st_size / 2);
+ Home = make_playpen(PlayPen, sb.st_size / 2);
if (unpack(fname, "+*")) {
whinge("Error during unpacking, no info for '%s' available.", pkg);
code = 1;
@@ -195,7 +197,7 @@ pkg_do(char *pkg)
}
free_plist(&plist);
bail:
- leave_playpen();
+ leave_playpen(Home);
if (isTMP)
unlink(fname);
return code;
@@ -204,5 +206,5 @@ pkg_do(char *pkg)
void
cleanup(int sig)
{
- leave_playpen();
+ leave_playpen(Home);
}