unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation
@ 2020-04-28 21:28 Marcin Karpezo
  2020-05-01 22:05 ` Ludovic Courtès
  2020-06-17 12:43 ` [bug#40950] Mcron originator: My opinion Dale Mellor
  0 siblings, 2 replies; 8+ messages in thread
From: Marcin Karpezo @ 2020-04-28 21:28 UTC (permalink / raw)
  To: 40950; +Cc: Marcin Karpezo

---
Hi!
With big rekado help I'm sending you a patch with at least partially
fixes the issue of crontab -e reporting missing /var/cron/tabs
directory.

 gnu/services/mcron.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm
index d9627c6bd0..ca9a54a041 100644
--- a/gnu/services/mcron.scm
+++ b/gnu/services/mcron.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -128,6 +129,12 @@ files."
               (actions
                (list (shepherd-schedule-action mcron files)))))))))

+(define (mcron-service-activation config)
+  (with-imported-modules '((guix build utils))
+    #~(begin
+        (use-modules (guix build utils))
+        (mkdir-p "/var/cron/tabs"))))
+
 (define mcron-service-type
   (service-type (name 'mcron)
                 (description
@@ -137,7 +144,10 @@ files."
                                           mcron-shepherd-services)
                        (service-extension profile-service-type
                                           (compose list
-                                                   mcron-configuration-mcron))))
+                                                   mcron-configuration-mcron))
+                       (service-extension activation-service-type
+                                          mcron-service-activation)))
+
                 (compose concatenate)
                 (extend (lambda (config jobs)
                           (mcron-configuration
--
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-09 16:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-28 21:28 [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation Marcin Karpezo
2020-05-01 22:05 ` Ludovic Courtès
2020-05-02 10:03   ` Marcin Karpezo
2020-05-02 13:44     ` Ludovic Courtès
2020-05-25 18:08       ` sirmacik
2020-06-17 12:43 ` [bug#40950] Mcron originator: My opinion Dale Mellor
2020-06-17 12:50   ` Dale Mellor
2021-08-09 16:12   ` [bug#40950] [PATCH] mcron, create /var/cron/tabs on activation Maxim Cournoyer

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).