From owner-freebsd-bugs Tue Aug 1 10:00:03 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id KAA00574 for bugs-outgoing; Tue, 1 Aug 1995 10:00:03 -0700 Received: (from gnats@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id KAA00566 ; Tue, 1 Aug 1995 10:00:02 -0700 Resent-Date: Tue, 1 Aug 1995 10:00:02 -0700 Resent-Message-Id: <199508011700.KAA00566@freefall.cdrom.com> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.cdrom.com, hohmuth@inf.tu-dresden.de Received: from irs201.inf.tu-dresden.de ([141.76.16.201]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id JAA00503 for ; Tue, 1 Aug 1995 09:56:25 -0700 Received: (from hohmuth@localhost) by irs201.inf.tu-dresden.de (8.6.11/8.6.9) id SAA01632; Tue, 1 Aug 1995 18:56:04 +0200 Message-Id: <199508011656.SAA01632@irs201.inf.tu-dresden.de> Date: Tue, 1 Aug 1995 18:56:04 +0200 From: hohmuth@inf.tu-dresden.de Reply-To: hohmuth@inf.tu-dresden.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/645: "install -c -s" can't install shell scripts Sender: bugs-owner@freebsd.org Precedence: bulk >Number: 645 >Category: bin >Synopsis: "install -c -s" can't install shell scripts >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 1 10:00:01 PDT 1995 >Last-Modified: >Originator: Michael Hohmuth >Organization: Dept. of Computer Science, TU Dresden, Germany >Release: FreeBSD 2.0.5-RELEASE i386 >Environment: uname -a yields: FreeBSD olymp.inf.tu-dresden.de 2.0.5-RELEASE FreeBSD 2.0.5-RELEASE #0: Wed Jul 5 12:39:10 1995 root@olymp.inf.tu-dresden.de:/usr/src/sys/compile/OLYMP i386 >Description: When invoked with "-s", `install' executes `strip' in order to strip the installed file. However, if the file can't be stripped (for example, if it is a shell script), `strip' will return an exit code != 0 which make `install' delete the destination file. `install' will return exit code 0 nevertheless. (The file installs OK when "-s" is omitted.) I believe that `install' should silently ignore failure codes returned by `strip' and should not delete the destination file. >How-To-Repeat: Here's a typescript: olymp:~> echo baz > foo olymp:~> install -c -s foo bar strip: bar: Inappropriate file type or format olymp:~> cat bar cat: bar: No such file or directory olymp:~> install -c foo bar olymp:~> cat bar baz >Fix: --- usr.bin/xinstall/xinstall.c~ Fri May 27 14:33:39 1994 +++ usr.bin/xinstall/xinstall.c Fri Jul 28 01:40:17 1995 @@ -311,7 +311,7 @@ execl(_PATH_STRIP, "strip", to_name, NULL); err("%s: %s", _PATH_STRIP, strerror(errno)); default: - if (wait(&status) == -1 || status) + if (wait(&status) == -1) (void)unlink(to_name); } } >Audit-Trail: >Unformatted: