From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 27 17:30:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD1E859B for ; Thu, 27 Feb 2014 17:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B79C31FD7 for ; Thu, 27 Feb 2014 17:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RHU15h040529 for ; Thu, 27 Feb 2014 17:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RHU1CA040528; Thu, 27 Feb 2014 17:30:01 GMT (envelope-from gnats) Resent-Date: Thu, 27 Feb 2014 17:30:01 GMT Resent-Message-Id: <201402271730.s1RHU1CA040528@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Frederic Culot Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B92DB4 for ; Thu, 27 Feb 2014 17:23:24 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 17BBB1E53 for ; Thu, 27 Feb 2014 17:23:24 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RHNNCL039844 for ; Thu, 27 Feb 2014 17:23:23 GMT (envelope-from culot@freefall.freebsd.org) Received: (from culot@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RHNNqt039843; Thu, 27 Feb 2014 17:23:23 GMT (envelope-from culot) Message-Id: <201402271723.s1RHNNqt039843@freefall.freebsd.org> Date: Thu, 27 Feb 2014 17:23:23 GMT From: Frederic Culot To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/187118: service(8): inaccurate error message X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Frederic Culot List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 17:30:02 -0000 >Number: 187118 >Category: bin >Synopsis: service(8): inaccurate error message >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 27 17:30:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Frederic Culot >Release: FreeBSD 11.0-CURRENT amd64 >Organization: FreeBSD >Environment: System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r259961: Fri Dec 27 21:56:39 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64 >Description: service(8) checks if the given script exists and is executable before proceeding (using the -x condition evaluation operator), and issues an error if one of those conditions is not met. The issue is that the error message is not accurate, telling only that the given script does not exist. However, it might be that a user started developing a startup script and forgot to switch on its execution flag. He might end up wondering why service(8) reports that his script is missing while in fact the only issue is that it is not executable. The attached patch tries to clarify the error message reported by service(8). >How-To-Repeat: # $EDITOR /etc/rc.d/my_startup_script # service my_startup_script start my_startup_script does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d) >Fix: --- service.patch begins here --- --- /usr/sbin/service 2014-02-01 11:08:51.792862305 +0100 +++ service 2014-02-27 17:03:29.220048128 +0100 @@ -145,5 +145,5 @@ # If the script was not found echo "$script does not exist in /etc/rc.d or the local startup" -echo "directories (${local_startup})" +echo "directories (${local_startup}), or is not executable" exit 1 --- service.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: