Solved What does "service name describe" actually do?

A. Forgot to set describe_cmd="${name}_describe".

In man rc.d it is written:
Code:
    Each script is expected to support at least the following arguments,
     which are automatically supported if it uses the run_rc_command()
     function:
. . .
           describe     Print a short description of what the script does.
. . .

I dutifully added this to my script:
Code:
idempiere_describe()
{
  echo "This script controls the start and stop of the idempiere process."
}

However, when I issue the command: service idempiere describe there is a noticeable delay before the command line prompt returns, but nothing is displayed in the session. So how is _describe implemented in a service script?
 
It's just a line in your /etc/rc.d script.

Here's an example from sshd:
Code:
# PROVIDE: sshd                                                                 
# REQUIRE: LOGIN FILESYSTEMS                                                    
# KEYWORD: shutdown                                                             
                                                                                
. /etc/rc.subr                                                                  
                                                                                
name="sshd"                                                                     
desc="Secure Shell Daemon"                                                      
rcvar="sshd_enable"                                                             
command="/usr/sbin/${name}"

You can see the desc= line in there.

So now you can get the blurb using the service command:
Code:
[cbell@ucbvax ~]$ service sshd describe
Secure Shell Daemon
[cbell@ucbvax ~]$
 
Back
Top