Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install/delete Replace calls to vsystem() by ca...
details: https://anonhg.NetBSD.org/src/rev/d9040951f536
branches: trunk
changeset: 551215:d9040951f536
user: tron <tron%NetBSD.org@localhost>
date: Mon Sep 01 17:43:23 2003 +0000
description:
Replace calls to vsystem() by calls to fexec().
diffstat:
usr.sbin/pkg_install/delete/perform.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (53 lines):
diff -r dc16733056c6 -r d9040951f536 usr.sbin/pkg_install/delete/perform.c
--- a/usr.sbin/pkg_install/delete/perform.c Mon Sep 01 17:15:34 2003 +0000
+++ b/usr.sbin/pkg_install/delete/perform.c Mon Sep 01 17:43:23 2003 +0000
@@ -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>
#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 @@
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 @@
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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index