civodul pushed a commit to branch devel in repository shepherd. commit 37ccd3384313cbf2c416b9b8e78f044b8362f79f Author: Ludovic Courtès <l...@gnu.org> AuthorDate: Sat Sep 7 17:30:37 2024 +0200
service: Serialize list of actions for <service>. * modules/shepherd/service.scm (service->sexp): Add ‘actions’. * tests/status-sexp.sh: Adjust sexps accordingly. --- modules/shepherd/service.scm | 1 + tests/status-sexp.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm index 43669ee..4b48086 100644 --- a/modules/shepherd/service.scm +++ b/modules/shepherd/service.scm @@ -1175,6 +1175,7 @@ clients." (transient? ,(transient-service? service)) (respawn-limit ,(service-respawn-limit service)) (respawn-delay ,(service-respawn-delay service)) + (actions ,(map action-name (service-actions service))) (exit-statuses ,(service-process-exit-statuses service)) (recent-messages ,(service-recent-messages service)) (log-files ,(service-log-files service)) diff --git a/tests/status-sexp.sh b/tests/status-sexp.sh index d62ab56..14b1e72 100644 --- a/tests/status-sexp.sh +++ b/tests/status-sexp.sh @@ -91,6 +91,7 @@ root_service_sexp=" (transient? #f) (respawn-limit (5 . 7)) (respawn-delay 0.1) + (actions (help status halt power-off load eval unload reload daemonize restart)) (exit-statuses ()) (recent-messages ()) (log-files (\"$PWD/$log\")) @@ -148,6 +149,7 @@ $define_canonicalize (status running) (one-shot? #f) (transient? #f) (respawn-limit (5 . 7)) (respawn-delay 1) + (actions ()) (exit-statuses ()) (recent-messages ()) (log-files ()) @@ -162,6 +164,7 @@ $define_canonicalize (status stopped) (one-shot? #f) (transient? #f) (respawn-limit (5 . 7)) (respawn-delay 1) + (actions ()) (exit-statuses ()) (recent-messages ()) (log-files ()) @@ -194,6 +197,7 @@ $define_canonicalize (status running) (one-shot? #f) (transient? #f) (respawn-limit (5 . 7)) (respawn-delay 1) + (actions ()) (exit-statuses ()) (recent-messages ()) (log-files ())