* [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames.
@ 2016-01-22 19:44 Alex Kost
2016-01-22 19:44 ` [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port' Alex Kost
` (3 more replies)
0 siblings, 4 replies; 16+ messages in thread
From: Alex Kost @ 2016-01-22 19:44 UTC (permalink / raw)
To: guix-devel
Hello, there are still many 'dmd' instances in the source, so here are
several patches for "dmd -> shepherd" transition. If this is
acceptable, I can continue to get rid of the left "dmd" things.
[PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port'.
[PATCH 2/4] Rename 'dmd-command' to 'shepherd-command'.
[PATCH 3/4] Rename 'dmd' service to 'shepherd'.
[PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port'.
2016-01-22 19:44 [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames Alex Kost
@ 2016-01-22 19:44 ` Alex Kost
2016-01-22 23:33 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command' Alex Kost
` (2 subsequent siblings)
3 siblings, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-01-22 19:44 UTC (permalink / raw)
To: guix-devel
* modules/shepherd/comm.scm (make-dmd-output-port): Rename to...
(make-shepherd-output-port): ... this.
(dmd-output-port): Rename to...
(shepherd-output-port): ... this.
* modules/shepherd.scm (main): Adjust accordingly.
---
modules/shepherd.scm | 2 +-
modules/shepherd/comm.scm | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 9ad3d09..2104848 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -141,7 +141,7 @@
(start-logging logfile)
;; Send output to log and clients.
- (set-current-output-port dmd-output-port)
+ (set-current-output-port shepherd-output-port)
;; Start the dmd service.
(start dmd-service)
diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index 2402e7e..b7bfc8c 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -50,7 +50,7 @@
start-logging
stop-logging
%current-client-socket
- dmd-output-port))
+ shepherd-output-port))
\f
;; Command for dmd.
@@ -165,7 +165,7 @@ return the socket."
;; We provide our own output mechanism, because we have certain
;; special needs; most importantly, we want to send output to herd
;; sometimes.
-(define (make-dmd-output-port original-output-port)
+(define (make-shepherd-output-port original-output-port)
(make-soft-port
(vector
@@ -222,5 +222,5 @@ return the socket."
;; It's an output-only port.
"w"))
-(define dmd-output-port
- (make-dmd-output-port (current-output-port)))
+(define shepherd-output-port
+ (make-shepherd-output-port (current-output-port)))
--
2.6.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command'.
2016-01-22 19:44 [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames Alex Kost
2016-01-22 19:44 ` [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port' Alex Kost
@ 2016-01-22 19:44 ` Alex Kost
2016-01-23 10:55 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 3/4] Rename 'dmd' service to 'shepherd' Alex Kost
2016-01-22 19:44 ` [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config Alex Kost
3 siblings, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-01-22 19:44 UTC (permalink / raw)
To: guix-devel
* modules/shepherd/comm.scm (<dmd-command>): Rename record type and its
accessors to...
(<shepherd-command>): ... this.
(read-command, write-command): Adjust accordingly.
* modules/halt.scm (main): Likewise.
* modules/herd.scm (run-command): Likewise.
* modules/reboot.scm (main): Likewise.
* modules/shepherd.scm (process-command, process-textual-commands): Likewise.
* tests/status-sexp.sh: Likewise.
* shepherd.texi (Communication): Likewise.
---
modules/halt.scm | 2 +-
modules/herd.scm | 2 +-
modules/reboot.scm | 2 +-
modules/shepherd.scm | 10 +++----
modules/shepherd/comm.scm | 66 +++++++++++++++++++++++------------------------
shepherd.texi | 15 ++++++-----
tests/status-sexp.sh | 4 +--
7 files changed, 51 insertions(+), 50 deletions(-)
diff --git a/modules/halt.scm b/modules/halt.scm
index 96da176..0f4a814 100644
--- a/modules/halt.scm
+++ b/modules/halt.scm
@@ -50,7 +50,7 @@
(with-system-error-handling
(let ((sock (open-connection socket-file)))
;; Send the command without further ado.
- (write-command (dmd-command 'power-off 'dmd) sock)
+ (write-command (shepherd-command 'power-off 'dmd) sock)
;; Receive output.
(setvbuf sock _IOLBF)
diff --git a/modules/herd.scm b/modules/herd.scm
index 40bd10a..3b330cb 100644
--- a/modules/herd.scm
+++ b/modules/herd.scm
@@ -104,7 +104,7 @@ the daemon via SOCKET-FILE."
'status
action)))
;; Send the command.
- (write-command (dmd-command action* service #:arguments args)
+ (write-command (shepherd-command action* service #:arguments args)
sock)
;; Receive output.
diff --git a/modules/reboot.scm b/modules/reboot.scm
index d92f2de..df21c7f 100644
--- a/modules/reboot.scm
+++ b/modules/reboot.scm
@@ -50,7 +50,7 @@
(with-system-error-handling
(let ((sock (open-connection socket-file)))
;; Send the command without further ado.
- (write-command (dmd-command 'stop 'dmd) sock)
+ (write-command (shepherd-command 'stop 'dmd) sock)
;; Receive output.
(setvbuf sock _IOLBF)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 2104848..1a14f09 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -222,9 +222,9 @@
(define (process-command command port)
"Interpret COMMAND, a command sent by the user, represented as a
-<dmd-command> object. Send the reply to PORT."
+<shepherd-command> object. Send the reply to PORT."
(match command
- (($ <dmd-command> the-action service-symbol (args ...) dir)
+ (($ <shepherd-command> the-action service-symbol (args ...) dir)
(chdir dir)
;; We have to catch `quit' so that we can send the terminator
@@ -281,9 +281,9 @@ would write them on the 'herd' command line."
(begin
(match (string-tokenize line)
((action service arguments ...)
- (process-command (dmd-command (string->symbol action)
- (string->symbol service)
- #:arguments arguments)
+ (process-command (shepherd-command (string->symbol action)
+ (string->symbol service)
+ #:arguments arguments)
port))
(_
(local-output "invalid command line" line)))
diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index b7bfc8c..79983b4 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -25,13 +25,13 @@
#:use-module (ice-9 match)
#:export (open-connection
- <dmd-command>
- dmd-command?
- dmd-command
- dmd-command-directory
- dmd-command-action
- dmd-command-service
- dmd-command-arguments
+ <shepherd-command>
+ shepherd-command?
+ shepherd-command
+ shepherd-command-directory
+ shepherd-command-action
+ shepherd-command-service
+ shepherd-command-arguments
<command-reply>
command-reply
@@ -53,19 +53,19 @@
shepherd-output-port))
\f
-;; Command for dmd.
-(define-record-type <dmd-command>
- (%dmd-command action service args directory)
- dmd-command?
- (action dmd-command-action) ; symbol
- (service dmd-command-service) ; symbol
- (args dmd-command-arguments) ; list of strings
- (directory dmd-command-directory)) ; directory name
-
-(define* (dmd-command action service
- #:key (arguments '()) (directory (getcwd)))
+;; Command for shepherd.
+(define-record-type <shepherd-command>
+ (%shepherd-command action service args directory)
+ shepherd-command?
+ (action shepherd-command-action) ; symbol
+ (service shepherd-command-service) ; symbol
+ (args shepherd-command-arguments) ; list of strings
+ (directory shepherd-command-directory)) ; directory name
+
+(define* (shepherd-command action service
+ #:key (arguments '()) (directory (getcwd)))
"Return a new command for ACTION on SERVICE."
- (%dmd-command action service arguments directory))
+ (%shepherd-command action service arguments directory))
(define* (open-connection #:optional (file default-socket-file))
"Open a connection to the daemon, using the Unix-domain socket at FILE, and
@@ -89,24 +89,24 @@ return the socket."
(define (read-command port)
"Receive a command from PORT."
(match (read port)
- (('dmd-command ('version 0 _ ...)
- ('action action)
- ('service service)
- ('arguments args ...)
- ('directory directory))
- (dmd-command action service
- #:arguments args
- #:directory directory))))
+ (('shepherd-command ('version 0 _ ...)
+ ('action action)
+ ('service service)
+ ('arguments args ...)
+ ('directory directory))
+ (shepherd-command action service
+ #:arguments args
+ #:directory directory))))
(define (write-command command port)
"Write COMMAND to PORT."
(match command
- (($ <dmd-command> action service (arguments ...) directory)
- (write `(dmd-command (version 0) ; protocol version
- (action ,action)
- (service ,service)
- (arguments ,@arguments)
- (directory ,directory))
+ (($ <shepherd-command> action service (arguments ...) directory)
+ (write `(shepherd-command (version 0) ; protocol version
+ (action ,action)
+ (service ,service)
+ (arguments ,@arguments)
+ (directory ,directory))
port))))
\f
diff --git a/shepherd.texi b/shepherd.texi
index b980254..105155f 100644
--- a/shepherd.texi
+++ b/shepherd.texi
@@ -1066,16 +1066,17 @@ as @command{herd} to connect to @command{shepherd} and send it commands to
control or change its behavior (@pxref{Slots of services, actions of
services}).
-@tindex <dmd-command>
+@tindex <shepherd-command>
Currently, clients may only send @dfn{commands}, represented by the
-@code{<dmd-command>} type. Each command specifies a service it applies
-to, an action name, a list of strings to be used as arguments, and a
-working directory. Commands are instantiated with @code{dmd-command}:
+@code{<shepherd-command>} type. Each command specifies a service it
+applies to, an action name, a list of strings to be used as arguments,
+and a working directory. Commands are instantiated with
+@code{shepherd-command}:
-@deffn {procedure} dmd-command @var{action} @var{service} @
+@deffn {procedure} shepherd-command @var{action} @var{service} @
[#:@var{arguments} '()] [#:@var{directory} (getcwd)]
-Return a new command (a @code{<dmd-command>}) object for @var{action} on
-@var{service}.
+Return a new command (a @code{<shepherd-command>}) object for
+@var{action} on @var{service}.
@end deffn
@noindent
diff --git a/tests/status-sexp.sh b/tests/status-sexp.sh
index a16c847..b47ce9a 100644
--- a/tests/status-sexp.sh
+++ b/tests/status-sexp.sh
@@ -62,7 +62,7 @@ test -S "$socket"
# Code to fetch service status info.
fetch_status="
(let ((sock (open-connection \"$socket\")))
- (write-command (dmd-command 'status 'dmd) sock)
+ (write-command (shepherd-command 'status 'dmd) sock)
(read sock))"
dmd_service_sexp="
@@ -98,7 +98,7 @@ dmd_service_sexp="
(use-modules (shepherd comm) (ice-9 match))
(match (let ((sock (open-connection \"$socket\")))
- (write-command (dmd-command 'status 'does-not-exist) sock)
+ (write-command (shepherd-command 'status 'does-not-exist) sock)
(read sock))
(('reply _ ...
('error ('error _ 'service-not-found 'does-not-exist))
--
2.6.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-22 19:44 [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames Alex Kost
2016-01-22 19:44 ` [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port' Alex Kost
2016-01-22 19:44 ` [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command' Alex Kost
@ 2016-01-22 19:44 ` Alex Kost
2016-01-22 20:05 ` Alex Kost
2016-01-23 10:58 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config Alex Kost
3 siblings, 2 replies; 16+ messages in thread
From: Alex Kost @ 2016-01-22 19:44 UTC (permalink / raw)
To: guix-devel
* modules/shepherd/service.scm (dmd-service): Rename to...
(shepherd-service): ... this. Adjust the rest file accordingly.
* modules/herd.scm: Likewise.
* modules/shepherd.scm: Likewise.
* modules/shepherd/support.scm (make-bare-init-file): Likewise.
* shepherd.texi: Likewise.
* tests/basic.sh: Likewise.
* tests/no-home.sh: Likewise.
* tests/status-sexp.sh: Likewise.
---
modules/herd.scm | 11 +++++----
modules/shepherd.scm | 10 ++++----
modules/shepherd/service.scm | 46 ++++++++++++++++++------------------
modules/shepherd/support.scm | 4 ++--
shepherd.texi | 55 ++++++++++++++++++++++----------------------
tests/basic.sh | 24 +++++++++----------
tests/no-home.sh | 4 ++--
tests/respawn.sh | 2 +-
tests/status-sexp.sh | 18 +++++++--------
9 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/modules/herd.scm b/modules/herd.scm
index 3b330cb..9f168e6 100644
--- a/modules/herd.scm
+++ b/modules/herd.scm
@@ -100,7 +100,8 @@ of pairs."
the daemon via SOCKET-FILE."
(with-system-error-handling
(let ((sock (open-connection socket-file))
- (action* (if (and (eq? service 'dmd) (eq? action 'detailed-status))
+ (action* (if (and (eq? service 'shepherd)
+ (eq? action 'detailed-status))
'status
action)))
;; Send the command.
@@ -122,9 +123,9 @@ the daemon via SOCKET-FILE."
;; Then interpret the result
(match (list action service)
- (('status 'dmd)
+ (('status 'shepherd)
(display-status-summary (first result)))
- (('detailed-status 'dmd)
+ (('detailed-status 'shepherd)
(display-detailed-status (first result)))
(('status _)
;; We get a list of statuses, in case several services have the
@@ -167,7 +168,7 @@ on service '~a':~%")
((? eof-object?)
;; When stopping shepherd, we may get an EOF in lieu of a real reply,
;; and that's fine. In other cases, a premature EOF is an error.
- (unless (and (eq? action 'stop) (eq? service 'dmd))
+ (unless (and (eq? action 'stop) (eq? service 'shepherd))
(format (current-error-port)
(l10n "premature end-of-file while talking to shepherd~%"))
(exit 1))))
@@ -198,7 +199,7 @@ on service '~a':~%")
(match (reverse command-args)
(((and action (or "status" "detailed-status"))) ;one argument
- (run-command socket-file (string->symbol action) 'dmd '()))
+ (run-command socket-file (string->symbol action) 'shepherd '()))
((action service args ...)
(run-command socket-file
(string->symbol action)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 1a14f09..352d59d 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -143,8 +143,8 @@
;; Send output to log and clients.
(set-current-output-port shepherd-output-port)
- ;; Start the dmd service.
- (start dmd-service)
+ ;; Start the shepherd service.
+ (start shepherd-service)
;; This _must_ succeed. (We could also put the `catch' around
;; `main', but it is often useful to get the backtrace, and
;; `caught-error' does not do this yet.)
@@ -178,7 +178,7 @@
;; ctrlaltdel(8).
(sigaction SIGINT
(lambda _
- (stop dmd-service)))
+ (stop shepherd-service)))
(if (not socket-file)
;; Get commands from the standard input port.
@@ -260,7 +260,7 @@
port))))
(lambda (key)
;; Most likely we're receiving 'quit' from the 'stop' method of
- ;; DMD-SERVICE. So, if we're running as 'root', just reboot.
+ ;; SHEPHERD-SERVICE. So, if we're running as 'root', just reboot.
(if (zero? (getuid))
(begin
(local-output "Rebooting...")
@@ -276,7 +276,7 @@ would write them on the 'herd' command line."
(if (eof-object? line)
;; Exit on `C-d'.
- (stop dmd-service)
+ (stop shepherd-service)
(begin
(match (string-tokenize line)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 46dc4c7..8726919 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -69,7 +69,7 @@
make-system-destructor
make-init.d-service
- dmd-service
+ shepherd-service
make-actions
&service-error
@@ -343,8 +343,8 @@ wire."
(slot-ref obj 'running)
args))
(lambda (key . args)
- ;; Special case: `dmd' may quit.
- (and (eq? dmd-service obj)
+ ;; Special case: `shepherd' may quit.
+ (and (eq? shepherd-service obj)
(eq? key 'quit)
(apply quit args))
(caught-error key args)))
@@ -404,8 +404,8 @@ wire."
(lambda ()
(apply proc (slot-ref obj 'running) args))
(lambda (key . args)
- ;; Special case: `dmd' may quit.
- (and (eq? dmd-service obj)
+ ;; Special case: `shepherd' may quit.
+ (and (eq? shepherd-service obj)
(eq? key 'quit)
(apply quit args))
(report-exception the-action obj key args)))))))
@@ -441,7 +441,7 @@ wire."
(action-list obj)))
(else
;; FIXME: Implement doc-help.
- (local-output "Unknown keyword. Try `doc dmd help'.")))))
+ (local-output "Unknown keyword. Try `doc shepherd help'.")))))
;; Return a list of canonical names of the services that conflict with
;; OBJ.
@@ -940,7 +940,7 @@ otherwise by updating its state."
(define (deregister-service service-name)
"For each string in SERVICE-NAME, stop the associated service if
necessary and remove it from the services table. If SERVICE-NAME is
-the special string 'all', remove all services except for dmd.
+the special string 'all', remove all services except for shepherd.
This will remove a service either if it is identified by its canonical
name, or if it is the only service providing the service that is
@@ -971,7 +971,7 @@ requested to be removed."
(match value
((service) ; only one service associated with KEY
(and (eq? key (canonical-name service))
- (not (eq? key 'dmd))
+ (not (eq? key 'shepherd))
(cons key service)))
(_ #f))) ; all other cases: #f.
services)))
@@ -1022,7 +1022,7 @@ requested to be removed."
\f
-;; The `dmd' service.
+;; The `shepherd' service.
(define (shutdown-services)
"Shut down all the currently running services; update the persistent state
@@ -1042,10 +1042,10 @@ file when persistence is enabled."
(lambda (p)
(format p "~{~a ~}~%" running-services))))))
-(define dmd-service
+(define shepherd-service
(make <service>
- #:docstring "The dmd service is used to operate on dmd itself."
- #:provides '(dmd)
+ #:docstring "The shepherd service is used to operate on shepherd itself."
+ #:provides '(shepherd)
#:requires '()
#:respawn #f
#:start (lambda args
@@ -1053,9 +1053,9 @@ file when persistence is enabled."
(display-version))
#t)
#:stop (lambda (unused . args)
- (local-output "Exiting dmd...")
+ (local-output "Exiting shepherd...")
;; Prevent that we try to stop ourself again.
- (slot-set! dmd-service 'running #f)
+ (slot-set! shepherd-service 'running #f)
(shutdown-services)
(quit))
;; All actions here need to take care that they do not invoke any
@@ -1075,7 +1075,7 @@ Clients such as 'herd' can read it and format it in a human-readable way."
"Halt the system."
(lambda (running)
(catch 'quit
- (cut stop dmd-service)
+ (cut stop shepherd-service)
(lambda (key)
(local-output "Halting...")
(halt)))))
@@ -1084,25 +1084,25 @@ Clients such as 'herd' can read it and format it in a human-readable way."
"Halt the system and turn it off."
(lambda (running)
(catch 'quit
- (cut stop dmd-service)
+ (cut stop shepherd-service)
(lambda (key)
(local-output "Shutting down...")
(power-off)))))
;; Load a configuration file.
(load
- "Load the Scheme code from FILE into dmd. This is potentially
+ "Load the Scheme code from FILE into shepherd. This is potentially
dangerous. You have been warned."
(lambda (running file-name)
(load-config file-name)))
;; Unload a service
(unload
"Unload the service identified by SERVICE-NAME or all services
-except for dmd if SERVICE-NAME is 'all'. Stop services before
+except for shepherd if SERVICE-NAME is 'all'. Stop services before
removing them if needed."
(lambda (running service-name)
(deregister-service service-name)))
(reload
- "Unload all services, then load from FILE-NAME into dmd. This
+ "Unload all services, then load from FILE-NAME into shepherd. This
is potentialy dangerous. You have been warned."
(lambda (running file-name)
(and (deregister-service "all") ; unload all services
@@ -1110,7 +1110,7 @@ is potentialy dangerous. You have been warned."
;; Go into the background.
(daemonize
"Go into the background. Be careful, this means that a new
-process will be created, so dmd will not get SIGCHLD signals anymore
+process will be created, so shepherd will not get SIGCHLD signals anymore
if previously spawned childs terminate. Therefore, this action should
usually only be used (if at all) *before* childs get spawned for which
we want to receive these signals."
@@ -1136,7 +1136,7 @@ name as argument that will be used to store the status."
(lambda (running)
(set! persistency #f)))
(cd
- "Change the working directory of dmd. This only makes sense
+ "Change the working directory of shepherd. This only makes sense
when in interactive mode, i.e. with `--socket=none'."
(lambda (running dir)
(chdir dir)))
@@ -1144,8 +1144,8 @@ when in interactive mode, i.e. with `--socket=none'."
;; we're better off by implementing it due to the
;; default action.
(restart
- "This does not work for dmd."
+ "This does not work for shepherd."
(lambda (running)
(local-output "You must be kidding."))))))
-(register-services dmd-service)
+(register-services shepherd-service)
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 2439085..f1878a6 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -223,8 +223,8 @@ TARGET should be a string representing a filepath + name."
;; providing them as arguments to 'register-services'.
""(register-services)
-;; Send dmd into the background
-""(action 'dmd 'daemonize)
+;; Send shepherd into the background
+""(action 'shepherd 'daemonize)
;; Services to start when dmd starts:
;; Add the name of each service that should be started to the list
diff --git a/shepherd.texi b/shepherd.texi
index 105155f..3245619 100644
--- a/shepherd.texi
+++ b/shepherd.texi
@@ -278,19 +278,18 @@ of the additional actions a service provides; obviously, it can also
be called when the service is not running. Services cannot provide
their own implementation of @code{list-actions}.
-A special service is @code{dmd}, which is used for controlling the Shepherd
-itself. It implements various actions. For example, the
-@code{status} action displays which services are started and which
-ones are stopped, whereas @code{detailed-status} has the effect of
-applying the default implementation of @code{status} to all services
-one after another. The @code{load}
-action is unusual insofar as it shows a feature that is actually
-available to all services, but which we have not seen yet: It takes an
-additional argument. You can use @code{load} to load arbitrary code
-into the Shepherd at runtime, like this:
+A special service is @code{shepherd}, which is used for controlling the
+Shepherd itself. It implements various actions. For example, the
+@code{status} action displays which services are started and which ones
+are stopped, whereas @code{detailed-status} has the effect of applying
+the default implementation of @code{status} to all services one after
+another. The @code{load} action is unusual insofar as it shows a
+feature that is actually available to all services, but which we have
+not seen yet: It takes an additional argument. You can use @code{load}
+to load arbitrary code into the Shepherd at runtime, like this:
@example
-herd load dmd ~/additional-services.scm
+herd load shepherd ~/additional-services.scm
@end example
This is enough now about the @command{herd} and @command{shepherd} programs, we
@@ -322,7 +321,7 @@ You can display the status of a service, even if the service does not
provide a specific implementation for this action. The same is true
for restarting.
@item
-The @code{dmd} service is used to control @command{shepherd} itself.
+The @code{shepherd} service is used to control @command{shepherd} itself.
@end itemize
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -446,11 +445,11 @@ herd [@var{option}@dots{}] @var{action} [@var{service} [@var{arg}@dots{}]]
It causes the @var{action} of the @var{service} to be invoked. When
@var{service} is omitted and @var{action} is @code{status} or
-@code{detailed-status}, the @code{dmd} service is used@footnote{This
+@code{detailed-status}, the @code{shepherd} service is used@footnote{This
shorthand does not work for other actions such as @code{stop}, because
inadvertently typing @code{herd stop} would stop all the services, which
-could be pretty annoying.} (@pxref{The dmd and unknown services}, for
-more information on the @code{dmd} service.)
+could be pretty annoying.} (@pxref{The shepherd and unknown services}, for
+more information on the @code{shepherd} service.)
For each action, you should pass the appropriate @var{arg}s. Actions
that are available for every service are @code{start}, @code{stop},
@@ -492,8 +491,8 @@ reboot the system. It has the following synopsis:
reboot [@var{option}@dots{}]
@end example
-It is equivalent to running @command{herd stop dmd}. The @code{reboot}
-command understands the following option:
+It is equivalent to running @command{herd stop shepherd}. The
+@code{reboot} command understands the following option:
@table @samp
@@ -518,8 +517,8 @@ off the system. It has the following synopsis:
halt [@var{option}@dots{}]
@end example
-It is equivalent to running @command{herd power-off dmd}. As usual, the
-@code{halt} command understands the following option:
+It is equivalent to running @command{herd power-off shepherd}. As
+usual, the @code{halt} command understands the following option:
@table @samp
@@ -555,7 +554,7 @@ defined in the @code{(shepherd service)} module.
* Service De- and Constructors:: Commonly used ways of starting and
stopping services.
* Service Examples:: Examples that show how services are used.
-* The dmd and unknown services:: Special services in the Shepherd.
+* The shepherd and unknown services:: Special services in the Shepherd.
@end menu
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -749,7 +748,7 @@ terminates.
Display status information about @var{obj}. This method is called
when the user performs the action @code{status} on @var{obj}, but
there is no specific implementation given for it. It is also called
-when @code{detailed-status} is applied on @code{dmd}.
+when @code{detailed-status} is applied on @code{shepherd}.
@end deffn
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -917,15 +916,15 @@ also specifies some more initial values for the slots:
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@node The dmd and unknown services
-@section The @code{dmd} and @code{unknown} services
+@node The shepherd and unknown services
+@section The @code{shepherd} and @code{unknown} services
-@cindex dmd service
+@cindex shepherd service
@cindex special services
-The service @code{dmd} is special, because it is used to control the Shepherd
-itself. It provides the following actions (in addition to
-@code{enable}, @code{disable} and @code{restart} which do not make
-sense here).
+The service @code{shepherd} is special, because it is used to control
+the Shepherd itself. It provides the following actions (in addition to
+@code{enable}, @code{disable} and @code{restart} which do not make sense
+here).
@table @code
@item status
diff --git a/tests/basic.sh b/tests/basic.sh
index 386b2b0..4b7ac64 100644
--- a/tests/basic.sh
+++ b/tests/basic.sh
@@ -67,8 +67,8 @@ dmd_pid="`cat $pid`"
kill -0 $dmd_pid
test -S "$socket"
-pristine_status=`$herd status dmd` # Prep for 'reload' test.
-echo $pristine_status | grep -E '(Start.*dmd|Stop.*test)'
+pristine_status=`$herd status shepherd` # Prep for 'reload' test.
+echo $pristine_status | grep -E '(Start.*shepherd|Stop.*test)'
$herd start test
test -f "$stamp"
@@ -97,30 +97,30 @@ do
$herd $action does-not-exist 2>&1 | grep "does-not-exist.*not.*found"
done
-if $herd an-action-that-does-not-exist dmd
+if $herd an-action-that-does-not-exist shepherd
then false; else true; fi
# Wrong number of arguments for an action.
-if $herd status dmd foo bar baz;
+if $herd status shepherd foo bar baz;
then false; else true; fi
# Loading nonexistent file.
-if $herd load dmd /does/not/exist.scm;
+if $herd load shepherd /does/not/exist.scm;
then false; else true; fi
# Unload one service, make sure the other it still around.
-$herd unload dmd test
+$herd unload shepherd test
$herd status | grep "Stopped: (test-2)"
-$herd reload dmd "$conf"
+$herd reload shepherd "$conf"
test "`$herd status`" == "$pristine_status"
-# Unload everything and make sure only 'dmd' is left.
-$herd unload dmd all
+# Unload everything and make sure only 'shepherd' is left.
+$herd unload shepherd all
$herd status | grep "Stopped: ()"
-$herd status | grep "Started: (dmd)"
+$herd status | grep "Started: (shepherd)"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
test -f "$log"
@@ -149,7 +149,7 @@ $herd stop test
dmd_pid="`cat $pid`"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
rm -rf $confdir
diff --git a/tests/no-home.sh b/tests/no-home.sh
index 132753b..f326833 100644
--- a/tests/no-home.sh
+++ b/tests/no-home.sh
@@ -43,8 +43,8 @@ dmd_pid="$!"
while ! test -f "$pid" ; do kill -0 "$dmd_pid" ; sleep 0.3 ; done
kill -0 `cat "$pid"`
-$herd status dmd
-$herd stop dmd
+$herd status shepherd
+$herd stop shepherd
if kill `cat "$pid"`
then
diff --git a/tests/respawn.sh b/tests/respawn.sh
index 629e684..eca5307 100644
--- a/tests/respawn.sh
+++ b/tests/respawn.sh
@@ -122,4 +122,4 @@ $herd status test1 | grep stopped
! kill -0 "$pid"
cat $service2_pid
-$herd stop dmd
+$herd stop shepherd
diff --git a/tests/status-sexp.sh b/tests/status-sexp.sh
index b47ce9a..c2c1c7a 100644
--- a/tests/status-sexp.sh
+++ b/tests/status-sexp.sh
@@ -62,14 +62,14 @@ test -S "$socket"
# Code to fetch service status info.
fetch_status="
(let ((sock (open-connection \"$socket\")))
- (write-command (shepherd-command 'status 'dmd) sock)
+ (write-command (shepherd-command 'status 'shepherd) sock)
(read sock))"
-dmd_service_sexp="
+shepherd_service_sexp="
(service (version 0)
- (provides (dmd)) (requires ())
+ (provides (shepherd)) (requires ())
(respawn? #f)
- (docstring \"The dmd service is used to operate on dmd itself.\")
+ (docstring \"The shepherd service is used to operate on shepherd itself.\")
(enabled? #t) (running #t) (last-respawns ()))"
"$GUILE" -c "
@@ -80,7 +80,7 @@ dmd_service_sexp="
(('reply _ ('result (services)) ('error #f) ('messages ()))
(lset= equal?
services
- '($dmd_service_sexp
+ '($shepherd_service_sexp
(service (version 0)
(provides (foo)) (requires ())
(respawn? #t) (docstring \"Foo!\")
@@ -108,8 +108,8 @@ dmd_service_sexp="
(pk 'wrong x)
(exit 1)))"
-# Unload everything and make sure only 'dmd' is left.
-$herd unload dmd all
+# Unload everything and make sure only 'shepherd' is left.
+$herd unload shepherd all
"$GUILE" -c "
(use-modules (shepherd comm))
@@ -118,10 +118,10 @@ $herd unload dmd all
(equal? $fetch_status
'(reply
(version 0)
- (result (($dmd_service_sexp)))
+ (result (($shepherd_service_sexp)))
(error #f) (messages ()))))"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
test -f "$log"
--
2.6.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config.
2016-01-22 19:44 [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames Alex Kost
` (2 preceding siblings ...)
2016-01-22 19:44 ` [PATCH 3/4] Rename 'dmd' service to 'shepherd' Alex Kost
@ 2016-01-22 19:44 ` Alex Kost
2016-01-26 9:50 ` Ludovic Courtès
3 siblings, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-01-22 19:44 UTC (permalink / raw)
To: guix-devel
* modules/shepherd/support.scm (make-bare-init-file): Adjust comment
lines for the rename.
---
modules/shepherd/support.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index f1878a6..369beb8 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -216,17 +216,17 @@ TARGET should be a string representing a filepath + name."
(with-output-to-file target
(lambda ()
(display (string-append
- ";; init.scm -- default dmd configuration file.
+ ";; init.scm -- default shepherd configuration file.
-;; Services known to dmd:
-;; Add new services (defined using 'make <service>') to dmd here by
+;; Services known to shepherd:
+;; Add new services (defined using 'make <service>') to shepherd here by
;; providing them as arguments to 'register-services'.
""(register-services)
;; Send shepherd into the background
""(action 'shepherd 'daemonize)
-;; Services to start when dmd starts:
+;; Services to start when shepherd starts:
;; Add the name of each service that should be started to the list
;; below passed to 'for-each'.
""(for-each start '())
--
2.6.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-22 19:44 ` [PATCH 3/4] Rename 'dmd' service to 'shepherd' Alex Kost
@ 2016-01-22 20:05 ` Alex Kost
2016-01-23 10:58 ` Ludovic Courtès
1 sibling, 0 replies; 16+ messages in thread
From: Alex Kost @ 2016-01-22 20:05 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 83 bytes --]
Arr, I missed 2 lines in "halt.scm" and "reboot.scm". Here is the
updated patch.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0003-Rename-dmd-service-to-shepherd.patch --]
[-- Type: text/x-patch, Size: 22577 bytes --]
From d91b7be586cb2edda6fd67bb6ef44a71bd669149 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Fri, 22 Jan 2016 22:19:46 +0300
Subject: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
* modules/shepherd/service.scm (dmd-service): Rename to...
(shepherd-service): ... this. Adjust the rest file accordingly.
* modules/shepherd.scm: Likewise.
* modules/herd.scm: Likewise.
* modules/halt.scm: Likewise.
* modules/reboot.scm: Likewise.
* modules/shepherd/support.scm (make-bare-init-file): Likewise.
* shepherd.texi: Likewise.
* tests/basic.sh: Likewise.
* tests/no-home.sh: Likewise.
* tests/status-sexp.sh: Likewise.
---
modules/halt.scm | 2 +-
modules/herd.scm | 11 +++++----
modules/reboot.scm | 2 +-
modules/shepherd.scm | 10 ++++----
modules/shepherd/service.scm | 46 ++++++++++++++++++------------------
modules/shepherd/support.scm | 4 ++--
shepherd.texi | 55 ++++++++++++++++++++++----------------------
tests/basic.sh | 24 +++++++++----------
tests/no-home.sh | 4 ++--
tests/respawn.sh | 2 +-
tests/status-sexp.sh | 18 +++++++--------
11 files changed, 89 insertions(+), 89 deletions(-)
diff --git a/modules/halt.scm b/modules/halt.scm
index 0f4a814..244d292 100644
--- a/modules/halt.scm
+++ b/modules/halt.scm
@@ -50,7 +50,7 @@
(with-system-error-handling
(let ((sock (open-connection socket-file)))
;; Send the command without further ado.
- (write-command (shepherd-command 'power-off 'dmd) sock)
+ (write-command (shepherd-command 'power-off 'shepherd) sock)
;; Receive output.
(setvbuf sock _IOLBF)
diff --git a/modules/herd.scm b/modules/herd.scm
index 3b330cb..9f168e6 100644
--- a/modules/herd.scm
+++ b/modules/herd.scm
@@ -100,7 +100,8 @@ of pairs."
the daemon via SOCKET-FILE."
(with-system-error-handling
(let ((sock (open-connection socket-file))
- (action* (if (and (eq? service 'dmd) (eq? action 'detailed-status))
+ (action* (if (and (eq? service 'shepherd)
+ (eq? action 'detailed-status))
'status
action)))
;; Send the command.
@@ -122,9 +123,9 @@ the daemon via SOCKET-FILE."
;; Then interpret the result
(match (list action service)
- (('status 'dmd)
+ (('status 'shepherd)
(display-status-summary (first result)))
- (('detailed-status 'dmd)
+ (('detailed-status 'shepherd)
(display-detailed-status (first result)))
(('status _)
;; We get a list of statuses, in case several services have the
@@ -167,7 +168,7 @@ on service '~a':~%")
((? eof-object?)
;; When stopping shepherd, we may get an EOF in lieu of a real reply,
;; and that's fine. In other cases, a premature EOF is an error.
- (unless (and (eq? action 'stop) (eq? service 'dmd))
+ (unless (and (eq? action 'stop) (eq? service 'shepherd))
(format (current-error-port)
(l10n "premature end-of-file while talking to shepherd~%"))
(exit 1))))
@@ -198,7 +199,7 @@ on service '~a':~%")
(match (reverse command-args)
(((and action (or "status" "detailed-status"))) ;one argument
- (run-command socket-file (string->symbol action) 'dmd '()))
+ (run-command socket-file (string->symbol action) 'shepherd '()))
((action service args ...)
(run-command socket-file
(string->symbol action)
diff --git a/modules/reboot.scm b/modules/reboot.scm
index df21c7f..7e75768 100644
--- a/modules/reboot.scm
+++ b/modules/reboot.scm
@@ -50,7 +50,7 @@
(with-system-error-handling
(let ((sock (open-connection socket-file)))
;; Send the command without further ado.
- (write-command (shepherd-command 'stop 'dmd) sock)
+ (write-command (shepherd-command 'stop 'shepherd) sock)
;; Receive output.
(setvbuf sock _IOLBF)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 1a14f09..352d59d 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -143,8 +143,8 @@
;; Send output to log and clients.
(set-current-output-port shepherd-output-port)
- ;; Start the dmd service.
- (start dmd-service)
+ ;; Start the shepherd service.
+ (start shepherd-service)
;; This _must_ succeed. (We could also put the `catch' around
;; `main', but it is often useful to get the backtrace, and
;; `caught-error' does not do this yet.)
@@ -178,7 +178,7 @@
;; ctrlaltdel(8).
(sigaction SIGINT
(lambda _
- (stop dmd-service)))
+ (stop shepherd-service)))
(if (not socket-file)
;; Get commands from the standard input port.
@@ -260,7 +260,7 @@
port))))
(lambda (key)
;; Most likely we're receiving 'quit' from the 'stop' method of
- ;; DMD-SERVICE. So, if we're running as 'root', just reboot.
+ ;; SHEPHERD-SERVICE. So, if we're running as 'root', just reboot.
(if (zero? (getuid))
(begin
(local-output "Rebooting...")
@@ -276,7 +276,7 @@ would write them on the 'herd' command line."
(if (eof-object? line)
;; Exit on `C-d'.
- (stop dmd-service)
+ (stop shepherd-service)
(begin
(match (string-tokenize line)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 46dc4c7..8726919 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -69,7 +69,7 @@
make-system-destructor
make-init.d-service
- dmd-service
+ shepherd-service
make-actions
&service-error
@@ -343,8 +343,8 @@ wire."
(slot-ref obj 'running)
args))
(lambda (key . args)
- ;; Special case: `dmd' may quit.
- (and (eq? dmd-service obj)
+ ;; Special case: `shepherd' may quit.
+ (and (eq? shepherd-service obj)
(eq? key 'quit)
(apply quit args))
(caught-error key args)))
@@ -404,8 +404,8 @@ wire."
(lambda ()
(apply proc (slot-ref obj 'running) args))
(lambda (key . args)
- ;; Special case: `dmd' may quit.
- (and (eq? dmd-service obj)
+ ;; Special case: `shepherd' may quit.
+ (and (eq? shepherd-service obj)
(eq? key 'quit)
(apply quit args))
(report-exception the-action obj key args)))))))
@@ -441,7 +441,7 @@ wire."
(action-list obj)))
(else
;; FIXME: Implement doc-help.
- (local-output "Unknown keyword. Try `doc dmd help'.")))))
+ (local-output "Unknown keyword. Try `doc shepherd help'.")))))
;; Return a list of canonical names of the services that conflict with
;; OBJ.
@@ -940,7 +940,7 @@ otherwise by updating its state."
(define (deregister-service service-name)
"For each string in SERVICE-NAME, stop the associated service if
necessary and remove it from the services table. If SERVICE-NAME is
-the special string 'all', remove all services except for dmd.
+the special string 'all', remove all services except for shepherd.
This will remove a service either if it is identified by its canonical
name, or if it is the only service providing the service that is
@@ -971,7 +971,7 @@ requested to be removed."
(match value
((service) ; only one service associated with KEY
(and (eq? key (canonical-name service))
- (not (eq? key 'dmd))
+ (not (eq? key 'shepherd))
(cons key service)))
(_ #f))) ; all other cases: #f.
services)))
@@ -1022,7 +1022,7 @@ requested to be removed."
\f
-;; The `dmd' service.
+;; The `shepherd' service.
(define (shutdown-services)
"Shut down all the currently running services; update the persistent state
@@ -1042,10 +1042,10 @@ file when persistence is enabled."
(lambda (p)
(format p "~{~a ~}~%" running-services))))))
-(define dmd-service
+(define shepherd-service
(make <service>
- #:docstring "The dmd service is used to operate on dmd itself."
- #:provides '(dmd)
+ #:docstring "The shepherd service is used to operate on shepherd itself."
+ #:provides '(shepherd)
#:requires '()
#:respawn #f
#:start (lambda args
@@ -1053,9 +1053,9 @@ file when persistence is enabled."
(display-version))
#t)
#:stop (lambda (unused . args)
- (local-output "Exiting dmd...")
+ (local-output "Exiting shepherd...")
;; Prevent that we try to stop ourself again.
- (slot-set! dmd-service 'running #f)
+ (slot-set! shepherd-service 'running #f)
(shutdown-services)
(quit))
;; All actions here need to take care that they do not invoke any
@@ -1075,7 +1075,7 @@ Clients such as 'herd' can read it and format it in a human-readable way."
"Halt the system."
(lambda (running)
(catch 'quit
- (cut stop dmd-service)
+ (cut stop shepherd-service)
(lambda (key)
(local-output "Halting...")
(halt)))))
@@ -1084,25 +1084,25 @@ Clients such as 'herd' can read it and format it in a human-readable way."
"Halt the system and turn it off."
(lambda (running)
(catch 'quit
- (cut stop dmd-service)
+ (cut stop shepherd-service)
(lambda (key)
(local-output "Shutting down...")
(power-off)))))
;; Load a configuration file.
(load
- "Load the Scheme code from FILE into dmd. This is potentially
+ "Load the Scheme code from FILE into shepherd. This is potentially
dangerous. You have been warned."
(lambda (running file-name)
(load-config file-name)))
;; Unload a service
(unload
"Unload the service identified by SERVICE-NAME or all services
-except for dmd if SERVICE-NAME is 'all'. Stop services before
+except for shepherd if SERVICE-NAME is 'all'. Stop services before
removing them if needed."
(lambda (running service-name)
(deregister-service service-name)))
(reload
- "Unload all services, then load from FILE-NAME into dmd. This
+ "Unload all services, then load from FILE-NAME into shepherd. This
is potentialy dangerous. You have been warned."
(lambda (running file-name)
(and (deregister-service "all") ; unload all services
@@ -1110,7 +1110,7 @@ is potentialy dangerous. You have been warned."
;; Go into the background.
(daemonize
"Go into the background. Be careful, this means that a new
-process will be created, so dmd will not get SIGCHLD signals anymore
+process will be created, so shepherd will not get SIGCHLD signals anymore
if previously spawned childs terminate. Therefore, this action should
usually only be used (if at all) *before* childs get spawned for which
we want to receive these signals."
@@ -1136,7 +1136,7 @@ name as argument that will be used to store the status."
(lambda (running)
(set! persistency #f)))
(cd
- "Change the working directory of dmd. This only makes sense
+ "Change the working directory of shepherd. This only makes sense
when in interactive mode, i.e. with `--socket=none'."
(lambda (running dir)
(chdir dir)))
@@ -1144,8 +1144,8 @@ when in interactive mode, i.e. with `--socket=none'."
;; we're better off by implementing it due to the
;; default action.
(restart
- "This does not work for dmd."
+ "This does not work for shepherd."
(lambda (running)
(local-output "You must be kidding."))))))
-(register-services dmd-service)
+(register-services shepherd-service)
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index 2439085..f1878a6 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -223,8 +223,8 @@ TARGET should be a string representing a filepath + name."
;; providing them as arguments to 'register-services'.
""(register-services)
-;; Send dmd into the background
-""(action 'dmd 'daemonize)
+;; Send shepherd into the background
+""(action 'shepherd 'daemonize)
;; Services to start when dmd starts:
;; Add the name of each service that should be started to the list
diff --git a/shepherd.texi b/shepherd.texi
index 105155f..3245619 100644
--- a/shepherd.texi
+++ b/shepherd.texi
@@ -278,19 +278,18 @@ of the additional actions a service provides; obviously, it can also
be called when the service is not running. Services cannot provide
their own implementation of @code{list-actions}.
-A special service is @code{dmd}, which is used for controlling the Shepherd
-itself. It implements various actions. For example, the
-@code{status} action displays which services are started and which
-ones are stopped, whereas @code{detailed-status} has the effect of
-applying the default implementation of @code{status} to all services
-one after another. The @code{load}
-action is unusual insofar as it shows a feature that is actually
-available to all services, but which we have not seen yet: It takes an
-additional argument. You can use @code{load} to load arbitrary code
-into the Shepherd at runtime, like this:
+A special service is @code{shepherd}, which is used for controlling the
+Shepherd itself. It implements various actions. For example, the
+@code{status} action displays which services are started and which ones
+are stopped, whereas @code{detailed-status} has the effect of applying
+the default implementation of @code{status} to all services one after
+another. The @code{load} action is unusual insofar as it shows a
+feature that is actually available to all services, but which we have
+not seen yet: It takes an additional argument. You can use @code{load}
+to load arbitrary code into the Shepherd at runtime, like this:
@example
-herd load dmd ~/additional-services.scm
+herd load shepherd ~/additional-services.scm
@end example
This is enough now about the @command{herd} and @command{shepherd} programs, we
@@ -322,7 +321,7 @@ You can display the status of a service, even if the service does not
provide a specific implementation for this action. The same is true
for restarting.
@item
-The @code{dmd} service is used to control @command{shepherd} itself.
+The @code{shepherd} service is used to control @command{shepherd} itself.
@end itemize
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -446,11 +445,11 @@ herd [@var{option}@dots{}] @var{action} [@var{service} [@var{arg}@dots{}]]
It causes the @var{action} of the @var{service} to be invoked. When
@var{service} is omitted and @var{action} is @code{status} or
-@code{detailed-status}, the @code{dmd} service is used@footnote{This
+@code{detailed-status}, the @code{shepherd} service is used@footnote{This
shorthand does not work for other actions such as @code{stop}, because
inadvertently typing @code{herd stop} would stop all the services, which
-could be pretty annoying.} (@pxref{The dmd and unknown services}, for
-more information on the @code{dmd} service.)
+could be pretty annoying.} (@pxref{The shepherd and unknown services}, for
+more information on the @code{shepherd} service.)
For each action, you should pass the appropriate @var{arg}s. Actions
that are available for every service are @code{start}, @code{stop},
@@ -492,8 +491,8 @@ reboot the system. It has the following synopsis:
reboot [@var{option}@dots{}]
@end example
-It is equivalent to running @command{herd stop dmd}. The @code{reboot}
-command understands the following option:
+It is equivalent to running @command{herd stop shepherd}. The
+@code{reboot} command understands the following option:
@table @samp
@@ -518,8 +517,8 @@ off the system. It has the following synopsis:
halt [@var{option}@dots{}]
@end example
-It is equivalent to running @command{herd power-off dmd}. As usual, the
-@code{halt} command understands the following option:
+It is equivalent to running @command{herd power-off shepherd}. As
+usual, the @code{halt} command understands the following option:
@table @samp
@@ -555,7 +554,7 @@ defined in the @code{(shepherd service)} module.
* Service De- and Constructors:: Commonly used ways of starting and
stopping services.
* Service Examples:: Examples that show how services are used.
-* The dmd and unknown services:: Special services in the Shepherd.
+* The shepherd and unknown services:: Special services in the Shepherd.
@end menu
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -749,7 +748,7 @@ terminates.
Display status information about @var{obj}. This method is called
when the user performs the action @code{status} on @var{obj}, but
there is no specific implementation given for it. It is also called
-when @code{detailed-status} is applied on @code{dmd}.
+when @code{detailed-status} is applied on @code{shepherd}.
@end deffn
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ -917,15 +916,15 @@ also specifies some more initial values for the slots:
@c @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@node The dmd and unknown services
-@section The @code{dmd} and @code{unknown} services
+@node The shepherd and unknown services
+@section The @code{shepherd} and @code{unknown} services
-@cindex dmd service
+@cindex shepherd service
@cindex special services
-The service @code{dmd} is special, because it is used to control the Shepherd
-itself. It provides the following actions (in addition to
-@code{enable}, @code{disable} and @code{restart} which do not make
-sense here).
+The service @code{shepherd} is special, because it is used to control
+the Shepherd itself. It provides the following actions (in addition to
+@code{enable}, @code{disable} and @code{restart} which do not make sense
+here).
@table @code
@item status
diff --git a/tests/basic.sh b/tests/basic.sh
index 386b2b0..4b7ac64 100644
--- a/tests/basic.sh
+++ b/tests/basic.sh
@@ -67,8 +67,8 @@ dmd_pid="`cat $pid`"
kill -0 $dmd_pid
test -S "$socket"
-pristine_status=`$herd status dmd` # Prep for 'reload' test.
-echo $pristine_status | grep -E '(Start.*dmd|Stop.*test)'
+pristine_status=`$herd status shepherd` # Prep for 'reload' test.
+echo $pristine_status | grep -E '(Start.*shepherd|Stop.*test)'
$herd start test
test -f "$stamp"
@@ -97,30 +97,30 @@ do
$herd $action does-not-exist 2>&1 | grep "does-not-exist.*not.*found"
done
-if $herd an-action-that-does-not-exist dmd
+if $herd an-action-that-does-not-exist shepherd
then false; else true; fi
# Wrong number of arguments for an action.
-if $herd status dmd foo bar baz;
+if $herd status shepherd foo bar baz;
then false; else true; fi
# Loading nonexistent file.
-if $herd load dmd /does/not/exist.scm;
+if $herd load shepherd /does/not/exist.scm;
then false; else true; fi
# Unload one service, make sure the other it still around.
-$herd unload dmd test
+$herd unload shepherd test
$herd status | grep "Stopped: (test-2)"
-$herd reload dmd "$conf"
+$herd reload shepherd "$conf"
test "`$herd status`" == "$pristine_status"
-# Unload everything and make sure only 'dmd' is left.
-$herd unload dmd all
+# Unload everything and make sure only 'shepherd' is left.
+$herd unload shepherd all
$herd status | grep "Stopped: ()"
-$herd status | grep "Started: (dmd)"
+$herd status | grep "Started: (shepherd)"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
test -f "$log"
@@ -149,7 +149,7 @@ $herd stop test
dmd_pid="`cat $pid`"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
rm -rf $confdir
diff --git a/tests/no-home.sh b/tests/no-home.sh
index 132753b..f326833 100644
--- a/tests/no-home.sh
+++ b/tests/no-home.sh
@@ -43,8 +43,8 @@ dmd_pid="$!"
while ! test -f "$pid" ; do kill -0 "$dmd_pid" ; sleep 0.3 ; done
kill -0 `cat "$pid"`
-$herd status dmd
-$herd stop dmd
+$herd status shepherd
+$herd stop shepherd
if kill `cat "$pid"`
then
diff --git a/tests/respawn.sh b/tests/respawn.sh
index 629e684..eca5307 100644
--- a/tests/respawn.sh
+++ b/tests/respawn.sh
@@ -122,4 +122,4 @@ $herd status test1 | grep stopped
! kill -0 "$pid"
cat $service2_pid
-$herd stop dmd
+$herd stop shepherd
diff --git a/tests/status-sexp.sh b/tests/status-sexp.sh
index b47ce9a..c2c1c7a 100644
--- a/tests/status-sexp.sh
+++ b/tests/status-sexp.sh
@@ -62,14 +62,14 @@ test -S "$socket"
# Code to fetch service status info.
fetch_status="
(let ((sock (open-connection \"$socket\")))
- (write-command (shepherd-command 'status 'dmd) sock)
+ (write-command (shepherd-command 'status 'shepherd) sock)
(read sock))"
-dmd_service_sexp="
+shepherd_service_sexp="
(service (version 0)
- (provides (dmd)) (requires ())
+ (provides (shepherd)) (requires ())
(respawn? #f)
- (docstring \"The dmd service is used to operate on dmd itself.\")
+ (docstring \"The shepherd service is used to operate on shepherd itself.\")
(enabled? #t) (running #t) (last-respawns ()))"
"$GUILE" -c "
@@ -80,7 +80,7 @@ dmd_service_sexp="
(('reply _ ('result (services)) ('error #f) ('messages ()))
(lset= equal?
services
- '($dmd_service_sexp
+ '($shepherd_service_sexp
(service (version 0)
(provides (foo)) (requires ())
(respawn? #t) (docstring \"Foo!\")
@@ -108,8 +108,8 @@ dmd_service_sexp="
(pk 'wrong x)
(exit 1)))"
-# Unload everything and make sure only 'dmd' is left.
-$herd unload dmd all
+# Unload everything and make sure only 'shepherd' is left.
+$herd unload shepherd all
"$GUILE" -c "
(use-modules (shepherd comm))
@@ -118,10 +118,10 @@ $herd unload dmd all
(equal? $fetch_status
'(reply
(version 0)
- (result (($dmd_service_sexp)))
+ (result (($shepherd_service_sexp)))
(error #f) (messages ()))))"
-$herd stop dmd
+$herd stop shepherd
! kill -0 $dmd_pid
test -f "$log"
--
2.6.3
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port'.
2016-01-22 19:44 ` [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port' Alex Kost
@ 2016-01-22 23:33 ` Ludovic Courtès
0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-22 23:33 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * modules/shepherd/comm.scm (make-dmd-output-port): Rename to...
> (make-shepherd-output-port): ... this.
> (dmd-output-port): Rename to...
> (shepherd-output-port): ... this.
> * modules/shepherd.scm (main): Adjust accordingly.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command'.
2016-01-22 19:44 ` [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command' Alex Kost
@ 2016-01-23 10:55 ` Ludovic Courtès
0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-23 10:55 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * modules/shepherd/comm.scm (<dmd-command>): Rename record type and its
> accessors to...
> (<shepherd-command>): ... this.
> (read-command, write-command): Adjust accordingly.
> * modules/halt.scm (main): Likewise.
> * modules/herd.scm (run-command): Likewise.
> * modules/reboot.scm (main): Likewise.
> * modules/shepherd.scm (process-command, process-textual-commands): Likewise.
> * tests/status-sexp.sh: Likewise.
> * shepherd.texi (Communication): Likewise.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-22 19:44 ` [PATCH 3/4] Rename 'dmd' service to 'shepherd' Alex Kost
2016-01-22 20:05 ` Alex Kost
@ 2016-01-23 10:58 ` Ludovic Courtès
2016-01-23 15:58 ` Alex Kost
2016-01-23 16:59 ` Mathieu Lirzin
1 sibling, 2 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-23 10:58 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * modules/shepherd/service.scm (dmd-service): Rename to...
> (shepherd-service): ... this. Adjust the rest file accordingly.
> * modules/herd.scm: Likewise.
> * modules/shepherd.scm: Likewise.
> * modules/shepherd/support.scm (make-bare-init-file): Likewise.
> * shepherd.texi: Likewise.
> * tests/basic.sh: Likewise.
> * tests/no-home.sh: Likewise.
> * tests/status-sexp.sh: Likewise.
This one I’m not sure. Since we occasionally have to type it on the
command line (like ‘herd load shepherd foo.scm’, ‘herd stop shepherd’,
etc.), I initially thought that we might as well rename it to ‘root’ or
similar so that it’s not too much of a burden.
But on second thought, it seems that we rarely have to type it anyway
(esp. since ‘herd status’ is now synonymous for ‘herd status dmd’) so
maybe ‘shepherd’ is OK after all.
WDYT?
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 10:58 ` Ludovic Courtès
@ 2016-01-23 15:58 ` Alex Kost
2016-01-23 17:05 ` Alex Kost
2016-01-23 16:59 ` Mathieu Lirzin
1 sibling, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-01-23 15:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-01-23 13:58 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * modules/shepherd/service.scm (dmd-service): Rename to...
>> (shepherd-service): ... this. Adjust the rest file accordingly.
>> * modules/herd.scm: Likewise.
>> * modules/shepherd.scm: Likewise.
>> * modules/shepherd/support.scm (make-bare-init-file): Likewise.
>> * shepherd.texi: Likewise.
>> * tests/basic.sh: Likewise.
>> * tests/no-home.sh: Likewise.
>> * tests/status-sexp.sh: Likewise.
>
> This one I’m not sure. Since we occasionally have to type it on the
> command line (like ‘herd load shepherd foo.scm’, ‘herd stop shepherd’,
> etc.), I initially thought that we might as well rename it to ‘root’ or
> similar so that it’s not too much of a burden.
>
> But on second thought, it seems that we rarely have to type it anyway
> (esp. since ‘herd status’ is now synonymous for ‘herd status dmd’) so
Yeah, I like that I can just type 'herd status' now, thanks!
Sometimes I also type 'deco doc dmd list-actions'.
> maybe ‘shepherd’ is OK after all.
>
> WDYT?
It seemed natural to me to rename 'dmd' service to 'shepherd' service.
But I like 'root' more! So if people agree on naming the main service
the 'root' instead of 'shepherd', I will send an updated patch.
OTOH 'herd load root foo.scm' looks strange for me. I would prefer
'herd load foo.scm', but it is a separate issue, I think.
--
Alex
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 10:58 ` Ludovic Courtès
2016-01-23 15:58 ` Alex Kost
@ 2016-01-23 16:59 ` Mathieu Lirzin
2016-01-23 21:26 ` Ludovic Courtès
1 sibling, 1 reply; 16+ messages in thread
From: Mathieu Lirzin @ 2016-01-23 16:59 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel, Alex Kost
ludo@gnu.org (Ludovic Courtès) writes:
> Alex Kost <alezost@gmail.com> skribis:
>
>> * modules/shepherd/service.scm (dmd-service): Rename to...
>> (shepherd-service): ... this. Adjust the rest file accordingly.
>> * modules/herd.scm: Likewise.
>> * modules/shepherd.scm: Likewise.
>> * modules/shepherd/support.scm (make-bare-init-file): Likewise.
>> * shepherd.texi: Likewise.
>> * tests/basic.sh: Likewise.
>> * tests/no-home.sh: Likewise.
>> * tests/status-sexp.sh: Likewise.
>
> This one I’m not sure. Since we occasionally have to type it on the
> command line (like ‘herd load shepherd foo.scm’, ‘herd stop shepherd’,
> etc.), I initially thought that we might as well rename it to ‘root’ or
> similar so that it’s not too much of a burden.
Maybe it sounds stupid, but we could follow the shepherd pun by renaming
the “dmd” service “dog” which is short and reminds watchdog(8). :)
--
Mathieu Lirzin
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 15:58 ` Alex Kost
@ 2016-01-23 17:05 ` Alex Kost
2016-01-23 21:24 ` Ludovic Courtès
0 siblings, 1 reply; 16+ messages in thread
From: Alex Kost @ 2016-01-23 17:05 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Alex Kost (2016-01-23 18:58 +0300) wrote:
> Ludovic Courtès (2016-01-23 13:58 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> * modules/shepherd/service.scm (dmd-service): Rename to...
>>> (shepherd-service): ... this. Adjust the rest file accordingly.
>>> * modules/herd.scm: Likewise.
>>> * modules/shepherd.scm: Likewise.
>>> * modules/shepherd/support.scm (make-bare-init-file): Likewise.
>>> * shepherd.texi: Likewise.
>>> * tests/basic.sh: Likewise.
>>> * tests/no-home.sh: Likewise.
>>> * tests/status-sexp.sh: Likewise.
>>
>> This one I’m not sure. Since we occasionally have to type it on the
>> command line (like ‘herd load shepherd foo.scm’, ‘herd stop shepherd’,
>> etc.), I initially thought that we might as well rename it to ‘root’ or
>> similar so that it’s not too much of a burden.
>>
>> But on second thought, it seems that we rarely have to type it anyway
>> (esp. since ‘herd status’ is now synonymous for ‘herd status dmd’) so
>
> Yeah, I like that I can just type 'herd status' now, thanks!
> Sometimes I also type 'deco doc dmd list-actions'.
>
>> maybe ‘shepherd’ is OK after all.
>>
>> WDYT?
>
> It seemed natural to me to rename 'dmd' service to 'shepherd' service.
> But I like 'root' more! So if people agree on naming the main service
> the 'root' instead of 'shepherd', I will send an updated patch.
>
> OTOH 'herd load root foo.scm' looks strange for me.
Also in user init.scm we'll have "(action 'root 'daemonize)" which also
looks less preferable than "(action 'shepherd 'daemonize)" for me. So
now I don't really know what name I prefer :-)
--
Alex
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 17:05 ` Alex Kost
@ 2016-01-23 21:24 ` Ludovic Courtès
2016-01-24 15:21 ` Alex Kost
0 siblings, 1 reply; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-23 21:24 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
[...]
>> It seemed natural to me to rename 'dmd' service to 'shepherd' service.
>> But I like 'root' more! So if people agree on naming the main service
>> the 'root' instead of 'shepherd', I will send an updated patch.
>>
>> OTOH 'herd load root foo.scm' looks strange for me.
Yeah, but ‘load dmd foo.scm’ also looks weird, after all.
> Also in user init.scm we'll have "(action 'root 'daemonize)" which also
> looks less preferable than "(action 'shepherd 'daemonize)" for me. So
> now I don't really know what name I prefer :-)
As long as it’s clear that it’s Smalltalk-style message passing, and
that ‘root’ is that special service, that’s fine, IMO.
Now that I think of it, since a service can provide several things, we
could simply change dmd-service to have:
#:provides '(root shepherd)
Thoughts?
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 16:59 ` Mathieu Lirzin
@ 2016-01-23 21:26 ` Ludovic Courtès
0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-23 21:26 UTC (permalink / raw)
To: Mathieu Lirzin; +Cc: guix-devel, Alex Kost
Mathieu Lirzin <mthl@gnu.org> skribis:
> Maybe it sounds stupid, but we could follow the shepherd pun by renaming
> the “dmd” service “dog” which is short and reminds watchdog(8). :)
Heheh. I’m concerned that this might increase confusion, though. :-)
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] Rename 'dmd' service to 'shepherd'.
2016-01-23 21:24 ` Ludovic Courtès
@ 2016-01-24 15:21 ` Alex Kost
0 siblings, 0 replies; 16+ messages in thread
From: Alex Kost @ 2016-01-24 15:21 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Ludovic Courtès (2016-01-24 00:24 +0300) wrote:
> Alex Kost <alezost@gmail.com> skribis:
>
>
> [...]
>
>>> It seemed natural to me to rename 'dmd' service to 'shepherd' service.
>>> But I like 'root' more! So if people agree on naming the main service
>>> the 'root' instead of 'shepherd', I will send an updated patch.
>>>
>>> OTOH 'herd load root foo.scm' looks strange for me.
>
> Yeah, but ‘load dmd foo.scm’ also looks weird, after all.
I agree, that's why I wrote that just ‘herd load foo.scm’ would be
better IMO.
>> Also in user init.scm we'll have "(action 'root 'daemonize)" which also
>> looks less preferable than "(action 'shepherd 'daemonize)" for me. So
>> now I don't really know what name I prefer :-)
>
> As long as it’s clear that it’s Smalltalk-style message passing, and
> that ‘root’ is that special service, that’s fine, IMO.
>
> Now that I think of it, since a service can provide several things, we
> could simply change dmd-service to have:
>
> #:provides '(root shepherd)
>
> Thoughts?
Oh, right! I think it is the best variant. I'm about to send a
patchset for this change.
--
Alex
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config.
2016-01-22 19:44 ` [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config Alex Kost
@ 2016-01-26 9:50 ` Ludovic Courtès
0 siblings, 0 replies; 16+ messages in thread
From: Ludovic Courtès @ 2016-01-26 9:50 UTC (permalink / raw)
To: Alex Kost; +Cc: guix-devel
Alex Kost <alezost@gmail.com> skribis:
> * modules/shepherd/support.scm (make-bare-init-file): Adjust comment
> lines for the rename.
Looks good, please push.
If you think there are other patches that I forgot, let me know!
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-01-26 9:50 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 19:44 [DMD] [PATCH 0/4]: 'dmd' to 'shepherd' renames Alex Kost
2016-01-22 19:44 ` [PATCH 1/4] Rename 'dmd-output-port' to 'shepherd-output-port' Alex Kost
2016-01-22 23:33 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 2/4] Rename 'dmd-command' to 'shepherd-command' Alex Kost
2016-01-23 10:55 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 3/4] Rename 'dmd' service to 'shepherd' Alex Kost
2016-01-22 20:05 ` Alex Kost
2016-01-23 10:58 ` Ludovic Courtès
2016-01-23 15:58 ` Alex Kost
2016-01-23 17:05 ` Alex Kost
2016-01-23 21:24 ` Ludovic Courtès
2016-01-24 15:21 ` Alex Kost
2016-01-23 16:59 ` Mathieu Lirzin
2016-01-23 21:26 ` Ludovic Courtès
2016-01-22 19:44 ` [PATCH 4/4] Rename 'dmd' to 'shepherd' in a generated user config Alex Kost
2016-01-26 9:50 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).