Replace calls to vsystem() by calls to fexec().
This commit is contained in:
parent
866f598bcb
commit
ce691fb888
@ -1,11 +1,11 @@
|
|||||||
/* $NetBSD: perform.c,v 1.41 2003/06/12 13:50:38 agc Exp $ */
|
/* $NetBSD: perform.c,v 1.42 2003/09/01 17:43:23 tron Exp $ */
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#if 0
|
#if 0
|
||||||
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
|
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: perform.c,v 1.41 2003/06/12 13:50:38 agc Exp $");
|
__RCSID("$NetBSD: perform.c,v 1.42 2003/09/01 17:43:23 tron Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -594,7 +594,7 @@ pkg_do(char *pkg)
|
|||||||
if (fexists(REQUIRE_FNAME)) {
|
if (fexists(REQUIRE_FNAME)) {
|
||||||
if (Verbose)
|
if (Verbose)
|
||||||
printf("Executing 'require' script.\n");
|
printf("Executing 'require' script.\n");
|
||||||
vsystem("%s +x %s", CHMOD_CMD, REQUIRE_FNAME); /* be sure */
|
(void) fexec(CHMOD_CMD, "+x", REQUIRE_FNAME, NULL); /* be sure */
|
||||||
if (vsystem("./%s %s DEINSTALL", REQUIRE_FNAME, pkg)) {
|
if (vsystem("./%s %s DEINSTALL", REQUIRE_FNAME, pkg)) {
|
||||||
warnx("package %s fails requirements %s", pkg,
|
warnx("package %s fails requirements %s", pkg,
|
||||||
Force ? "" : "- not deleted");
|
Force ? "" : "- not deleted");
|
||||||
@ -606,7 +606,7 @@ pkg_do(char *pkg)
|
|||||||
if (Fake)
|
if (Fake)
|
||||||
printf("Would execute de-install script at this point (arg: DEINSTALL).\n");
|
printf("Would execute de-install script at this point (arg: DEINSTALL).\n");
|
||||||
else {
|
else {
|
||||||
vsystem("%s +x %s", CHMOD_CMD, DEINSTALL_FNAME); /* make sure */
|
(void ) fexec(CHMOD_CMD, "+x", DEINSTALL_FNAME, NULL); /* make sure */
|
||||||
if (vsystem("./%s %s DEINSTALL", DEINSTALL_FNAME, pkg)) {
|
if (vsystem("./%s %s DEINSTALL", DEINSTALL_FNAME, pkg)) {
|
||||||
warnx("deinstall script returned error status");
|
warnx("deinstall script returned error status");
|
||||||
if (!Force)
|
if (!Force)
|
||||||
@ -645,7 +645,7 @@ pkg_do(char *pkg)
|
|||||||
if (Fake)
|
if (Fake)
|
||||||
printf("Would execute post-de-install script at this point (arg: POST-DEINSTALL).\n");
|
printf("Would execute post-de-install script at this point (arg: POST-DEINSTALL).\n");
|
||||||
else {
|
else {
|
||||||
vsystem("chmod +x %s", DEINSTALL_FNAME); /* make sure */
|
(void ) fexec(CHMOD_CMD, "+x", DEINSTALL_FNAME, NULL); /* make sure */
|
||||||
if (vsystem("./%s %s POST-DEINSTALL", DEINSTALL_FNAME, pkg)) {
|
if (vsystem("./%s %s POST-DEINSTALL", DEINSTALL_FNAME, pkg)) {
|
||||||
warnx("post-deinstall script returned error status");
|
warnx("post-deinstall script returned error status");
|
||||||
if (!Force)
|
if (!Force)
|
||||||
@ -659,7 +659,7 @@ pkg_do(char *pkg)
|
|||||||
warnx("Oops - removed current working directory. Oh, well.");
|
warnx("Oops - removed current working directory. Oh, well.");
|
||||||
if (!Fake) {
|
if (!Fake) {
|
||||||
/* Finally nuke the +-files and the pkgdb-dir (/var/db/pkg/foo) */
|
/* Finally nuke the +-files and the pkgdb-dir (/var/db/pkg/foo) */
|
||||||
if (vsystem("%s -r %s", REMOVE_CMD, LogDir)) {
|
if (fexec(REMOVE_CMD, "-r", LogDir, NULL)) {
|
||||||
warnx("couldn't remove log entry in %s, deinstall failed", LogDir);
|
warnx("couldn't remove log entry in %s, deinstall failed", LogDir);
|
||||||
if (!Force)
|
if (!Force)
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user