-.\" $OpenBSD: install.1,v 1.4 1996/08/08 20:49:27 millert Exp $
+.\" $OpenBSD: install.1,v 1.5 1997/04/17 19:13:55 millert Exp $
.\" $NetBSD: install.1,v 1.4 1994/11/14 04:57:17 jtc Exp $
.\"
.\" Copyright (c) 1987, 1990, 1993
.It Fl s
.Nm Install
exec's the command
-.Xr strip 1
+.Pa /usr/bin/strip
to strip binaries so that install can be portable over a large
-number of systems and binary types.
+number of systems and binary types. If the environment variable
+.Ev STRIP
+is set, it is used instead.
.El
.Pp
By default,
where XXXXXX is decided by
.Xr mkstemp 3 ,
are created in the target directory.
+.Sh ENVIRONMENT
+.Nm
+utilizes the following environment variables.
+.Bl -tag -width "STRIP"
+.It Ev STRIP
+For an alternate
+.Xr strip 1
+program to run. Default is
+.Pa /usr/bin/strip .
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr chgrp 1 ,
-/* $OpenBSD: xinstall.c,v 1.12 1997/03/07 01:57:08 millert Exp $ */
+/* $OpenBSD: xinstall.c,v 1.13 1997/04/17 19:13:58 millert Exp $ */
/* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */
/*
#if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif
-static char rcsid[] = "$OpenBSD: xinstall.c,v 1.12 1997/03/07 01:57:08 millert Exp $";
+static char rcsid[] = "$OpenBSD: xinstall.c,v 1.13 1997/04/17 19:13:58 millert Exp $";
#endif /* not lint */
#include <sys/param.h>
char *to_name;
{
int serrno, status;
+ char *path_strip;
+
+ if (issetugid() || (path_strip = getenv("STRIP")) == NULL)
+ path_strip = _PATH_STRIP;
switch (vfork()) {
case -1:
(void)unlink(to_name);
errx(EX_TEMPFAIL, "forks: %s", strerror(serrno));
case 0:
- execl(_PATH_STRIP, "strip", to_name, NULL);
- warn("%s", _PATH_STRIP);
+ execl(path_strip, "strip", to_name, NULL);
+ warn("%s", path_strip);
_exit(EX_OSERR);
default:
if (wait(&status) == -1 || status)