summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1993-09-18 03:38:48 +0000
committerjkh <jkh@FreeBSD.org>1993-09-18 03:38:48 +0000
commit1bb96bf0e126b01b7f62c92ead98c66458dc442a (patch)
treedd786a564ed0cc79f33dd6546c2765ef63e5d735 /usr.sbin
parentb3c3e8d6c02cd1b7ebd78dc1e444caf1d2c612d2 (diff)
downloadFreeBSD-src-1bb96bf0e126b01b7f62c92ead98c66458dc442a.zip
FreeBSD-src-1bb96bf0e126b01b7f62c92ead98c66458dc442a.tar.gz
Make sure permissions on registry location are readable by pkg_info.
Add new % sequence expansion for command execution.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/add/extract.c12
-rw-r--r--usr.sbin/pkg_install/add/perform.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/usr.sbin/pkg_install/add/extract.c b/usr.sbin/pkg_install/add/extract.c
index c9978cd..d5db041 100644
--- a/usr.sbin/pkg_install/add/extract.c
+++ b/usr.sbin/pkg_install/add/extract.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: extract.c,v 1.5 1993/09/04 05:06:26 jkh Exp $";
+static const char *rcsid = "$Id: extract.c,v 1.4 1993/09/06 23:26:21 jkh Exp $";
#endif
/*
@@ -40,6 +40,8 @@ extract_plist(char *home, Package *pkg)
/* Do it */
while (p) {
+ char cmd[FILENAME_MAX];
+
switch(p->type) {
case PLIST_NAME:
PkgName = p->name;
@@ -75,11 +77,11 @@ extract_plist(char *home, Package *pkg)
break;
case PLIST_CMD:
+ format_cmd(cmd, p->name, Directory, last_file);
if (Verbose)
- printf("extract: exec cmd '%s' (lastfile = %s)\n", p->name,
- last_file);
- if (!Fake && vsystem(p->name, Directory, last_file))
- whinge("Command '%s' failed.", p->name);
+ printf("extract: execute '%s'\n", cmd);
+ if (!Fake && system(cmd))
+ whinge("Command '%s' failed.", cmd);
break;
case PLIST_CHMOD:
diff --git a/usr.sbin/pkg_install/add/perform.c b/usr.sbin/pkg_install/add/perform.c
index d285c0e..be7b507 100644
--- a/usr.sbin/pkg_install/add/perform.c
+++ b/usr.sbin/pkg_install/add/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.8 1993/09/04 05:06:29 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.3 1993/09/05 04:53:50 jkh Exp $";
#endif
/*
@@ -168,6 +168,8 @@ pkg_do(char *pkg)
code = 1;
goto success; /* close enough for government work */
}
+ /* Make sure pkg_info can read the entry */
+ vsystem("chmod a+rx %s", LogDir);
if (fexists(DEINSTALL_FNAME))
copy_file(".", DEINSTALL_FNAME, LogDir);
if (fexists(REQUIRE_FNAME))
OpenPOWER on IntegriCloud