[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-bugs
Subject:    bin/187118: service(8): inaccurate error message
From:       Frederic Culot <culot () FreeBSD ! org>
Date:       2014-02-27 17:23:23
Message-ID: 201402271723.s1RHNNqt039843 () freefall ! freebsd ! org
[Download RAW message or body]


> 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:
_______________________________________________
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic