diff options
author | root <devnull@localhost> | 1996-05-22 19:39:24 +0000 |
---|---|---|
committer | root <devnull@localhost> | 1996-05-22 19:39:24 +0000 |
commit | a6b6d18e5ceb3b637ca5616740a97874d2b25f23 (patch) | |
tree | 4a68358aec1002e9e5a4f2f8ba26d907dde73507 /lib | |
parent | 4768c9cca20016256c129e1118e890615b09db9d (diff) | |
download | rpm-a6b6d18e5ceb3b637ca5616740a97874d2b25f23.tar.gz rpm-a6b6d18e5ceb3b637ca5616740a97874d2b25f23.tar.bz2 rpm-a6b6d18e5ceb3b637ca5616740a97874d2b25f23.zip |
use PATH to find cpio
CVS patchset: 586
CVS date: 1996/05/22 19:39:24
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/install.c b/lib/install.c index 2e8781453..df09dcbe2 100644 --- a/lib/install.c +++ b/lib/install.c @@ -452,7 +452,6 @@ static int installArchive(char * prefix, int fd, struct fileToInstall * files, int status; int cpioFailed = 0; void * oldhandler; - char * cpioBinary; int needSecondPipe; char line[1024]; int j; @@ -474,18 +473,9 @@ static int installArchive(char * prefix, int fd, struct fileToInstall * files, if (specFile) *specFile = NULL; - if (access("/bin/cpio", X_OK)) { - if (access("/usr/bin/cpio", X_OK)) { - error(RPMERR_CPIO, "cpio cannot be found in /bin or /usr/sbin"); - return 1; - } else - cpioBinary = "/usr/bin/cpio"; - } else - cpioBinary = "/bin/cpio"; - args = alloca(sizeof(char *) * (fileCount + 10)); - args[i++] = cpioBinary; + args[i++] = "cpio"; args[i++] = "--extract"; args[i++] = "--unconditional"; args[i++] = "--preserve-modification-time"; @@ -565,7 +555,7 @@ static int installArchive(char * prefix, int fd, struct fileToInstall * files, close(statusPipe[1]); } - execv(args[0], args); + execvp(args[0], args); exit(-1); } |