diff options
| author | Patrick Norton <patrick.147.norton@gmail.com> | 2026-05-15 19:39:16 -0400 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-05-17 22:12:07 +0200 |
| commit | bc998dcd1cf1a6a9a4ea9017148094eb6c8a8d56 (patch) | |
| tree | a7ac58ebd7139da6ac78690a4362a43c48cf575a /gnu | |
| parent | 1238aa538cdc265b2ef0d38f49be2deda04e4549 (diff) | |
gnu: home-services: Fix serialization of environment-variables.
* gnu/home/services/ssh.scm (serialize-string-alist): Fix serialization.
(serialize-symbol): Check for %unset-marker% symbol.
(serialize-field-name): Fix typo in name SendEnv.
Change-Id: I69f340178ef30e9d03a87be4a6495b1704f140f4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Merges: #8659
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/home/services/ssh.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/home/services/ssh.scm b/gnu/home/services/ssh.scm index 4fca0a71fbd..d38490cb36e 100644 --- a/gnu/home/services/ssh.scm +++ b/gnu/home/services/ssh.scm | |||
| @@ -89,7 +89,7 @@ | |||
| 89 | (define (serialize-field-name name) | 89 | (define (serialize-field-name name) |
| 90 | (match name | 90 | (match name |
| 91 | ('accepted-key-types "PubkeyAcceptedKeyTypes") | 91 | ('accepted-key-types "PubkeyAcceptedKeyTypes") |
| 92 | ('sent-environment-variables "SentEnv") | 92 | ('sent-environment-variables "SendEnv") |
| 93 | ('environment-variables "SetEnv") | 93 | ('environment-variables "SetEnv") |
| 94 | ('control-file-name "ControlPath") | 94 | ('control-file-name "ControlPath") |
| 95 | (_ | 95 | (_ |
| @@ -139,8 +139,10 @@ | |||
| 139 | (define-maybe natural-number) | 139 | (define-maybe natural-number) |
| 140 | 140 | ||
| 141 | (define (serialize-symbol field value) | 141 | (define (serialize-symbol field value) |
| 142 | (string-append " " (serialize-field-name field) " " | 142 | (if (maybe-value-set? value) |
| 143 | (symbol->string value) "\n")) | 143 | (string-append " " (serialize-field-name field) " " |
| 144 | (symbol->string value) "\n") | ||
| 145 | "")) | ||
| 144 | 146 | ||
| 145 | (define-maybe symbol) | 147 | (define-maybe symbol) |
| 146 | 148 | ||
| @@ -178,7 +180,7 @@ | |||
| 178 | (string-join | 180 | (string-join |
| 179 | (map (match-lambda | 181 | (map (match-lambda |
| 180 | ((key . value) | 182 | ((key . value) |
| 181 | (format #nil "~a = ~s~%" (serialize-field-name key) value))) | 183 | (format #nil "~s" (string-append key "=" value)))) |
| 182 | lst) " ") "\n")) | 184 | lst) " ") "\n")) |
| 183 | 185 | ||
| 184 | (define-maybe string-alist) | 186 | (define-maybe string-alist) |
