From 617d06c71c6e40fbc2343c420335e00467889c8e Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Wed, 15 Mar 2006 13:47:03 +0000 Subject: [PATCH] add a "name" action, which pretty prints the "nice name" for a package (so, mailserver or smtpd or so for a mailserver like sendmail) svn path=/nixpkgs/trunk/; revision=5043 --- pkgs/servers/server-scripts/generic/functions | 4 ++++ pkgs/servers/ssh-script/sshd | 3 +++ 2 files changed, 7 insertions(+) diff --git a/pkgs/servers/server-scripts/generic/functions b/pkgs/servers/server-scripts/generic/functions index 6ed24b3d7584..ceb46a481495 100644 --- a/pkgs/servers/server-scripts/generic/functions +++ b/pkgs/servers/server-scripts/generic/functions @@ -76,3 +76,7 @@ status() { echo "stopped" fi } + +name() { + echo $prog +} diff --git a/pkgs/servers/ssh-script/sshd b/pkgs/servers/ssh-script/sshd index 5668f8f9c237..6dd7131bc41d 100755 --- a/pkgs/servers/ssh-script/sshd +++ b/pkgs/servers/ssh-script/sshd @@ -153,6 +153,9 @@ case "$1" in status $SSHD RETVAL=$? ;; + name) + name + ;; *) echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" RETVAL=1