From culot@FreeBSD.org  Thu Feb 27 17:23:24 2014
Return-Path: <culot@FreeBSD.org>
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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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 <culot@FreeBSD.org>
Reply-To: Frederic Culot <culot@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: service(8): inaccurate error message
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         187118
>Category:       bin
>Synopsis:       service(8): inaccurate error message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          patched
>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:  Wed Apr 16 02:22:39 UTC 2014
>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:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/187118: commit references a PR
Date: Sat, 15 Mar 2014 02:26:54 +0000 (UTC)

 Author: eadler
 Date: Sat Mar 15 02:26:46 2014
 New Revision: 263202
 URL: http://svnweb.freebsd.org/changeset/base/263202
 
 Log:
   Be a little more verbose in service's error message
   
   PR:		bin/187118
   Submitted by:	culot
 
 Modified:
   head/usr.sbin/service/service.sh
 
 Modified: head/usr.sbin/service/service.sh
 ==============================================================================
 --- head/usr.sbin/service/service.sh	Sat Mar 15 01:20:42 2014	(r263201)
 +++ head/usr.sbin/service/service.sh	Sat Mar 15 02:26:46 2014	(r263202)
 @@ -145,5 +145,5 @@ done
  
  # 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
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: linimon 
State-Changed-When: Wed Apr 16 02:21:53 UTC 2014 
State-Changed-Why:  
over to committer for MFC reminder. 


Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Apr 16 02:21:53 UTC 2014 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=187118 
>Unformatted:
