diff --git a/usr.sbin/pkg_install/delete/perform.c b/usr.sbin/pkg_install/delete/perform.c index dd41d8c9ee2f..e4b7cb464ad8 100644 --- a/usr.sbin/pkg_install/delete/perform.c +++ b/usr.sbin/pkg_install/delete/perform.c @@ -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 #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.15 1997/10/13 15:03:52 jkh Exp"; #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 @@ -594,7 +594,7 @@ pkg_do(char *pkg) if (fexists(REQUIRE_FNAME)) { if (Verbose) 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)) { warnx("package %s fails requirements %s", pkg, Force ? "" : "- not deleted"); @@ -606,7 +606,7 @@ pkg_do(char *pkg) if (Fake) printf("Would execute de-install script at this point (arg: DEINSTALL).\n"); 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)) { warnx("deinstall script returned error status"); if (!Force) @@ -645,7 +645,7 @@ pkg_do(char *pkg) if (Fake) printf("Would execute post-de-install script at this point (arg: POST-DEINSTALL).\n"); 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)) { warnx("post-deinstall script returned error status"); if (!Force) @@ -659,7 +659,7 @@ pkg_do(char *pkg) warnx("Oops - removed current working directory. Oh, well."); if (!Fake) { /* 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); if (!Force) return 1;