diff options
| author | Christopher Baines <mail@cbaines.net> | 2017-02-23 08:20:57 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-10 14:48:06 +0100 |
| commit | fe2b6434f02c8abb26aebb59c4e0d0ccacb4fc90 (patch) | |
| tree | 1c70c0ce38394a6f8c13ded6d03d6a64afc5a118 /gnu/services.scm | |
| parent | 82ccc499f7262982beb2da9827d5706967a334f0 (diff) | |
services: Create /var/log upon activation.
When launching a container created with guix system container, the
attempt to create /var/log/wtmp would fail, as /var/log did not exist.
* gnu/services.scm (activation-script): Create /var/log
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services.scm')
| -rw-r--r-- | gnu/services.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/services.scm b/gnu/services.scm index 6ac4f1322d2..6c88f2621b6 100644 --- a/gnu/services.scm +++ b/gnu/services.scm | |||
| @@ -334,9 +334,11 @@ ACTIVATION-SCRIPT-TYPE." | |||
| 334 | (mlet* %store-monad ((actions (service-activations))) | 334 | (mlet* %store-monad ((actions (service-activations))) |
| 335 | (gexp->file "activate" | 335 | (gexp->file "activate" |
| 336 | (with-imported-modules (source-module-closure | 336 | (with-imported-modules (source-module-closure |
| 337 | '((gnu build activation))) | 337 | '((gnu build activation) |
| 338 | (guix build utils))) | ||
| 338 | #~(begin | 339 | #~(begin |
| 339 | (use-modules (gnu build activation)) | 340 | (use-modules (gnu build activation) |
| 341 | (guix build utils)) | ||
| 340 | 342 | ||
| 341 | ;; Make sure the user accounting database exists. If it | 343 | ;; Make sure the user accounting database exists. If it |
| 342 | ;; does not exist, 'setutxent' does not create it and | 344 | ;; does not exist, 'setutxent' does not create it and |
| @@ -345,6 +347,7 @@ ACTIVATION-SCRIPT-TYPE." | |||
| 345 | 347 | ||
| 346 | ;; Same for 'wtmp', which is populated by mingetty et | 348 | ;; Same for 'wtmp', which is populated by mingetty et |
| 347 | ;; al. | 349 | ;; al. |
| 350 | (mkdir-p "/var/log") | ||
| 348 | (close-port (open-file "/var/log/wtmp" "a0")) | 351 | (close-port (open-file "/var/log/wtmp" "a0")) |
| 349 | 352 | ||
| 350 | ;; Set up /run/current-system. Among other things this | 353 | ;; Set up /run/current-system. Among other things this |
