mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
services: Fix 'mkdir-p' in activation scripts.
* gnu/services/cups.scm (%cups-activation): Import (guix build utils). * gnu/services/mail.scm (opensmtpd-activation): Idem. * gnu/services/networking.scm (ntp-service-activation): Idem. * gnu/services/spice.scm (spice-vdagent-activation): Idem. * gnu/services/ssh.scm (openssh-activation): Idem. (dropbear-activation): Idem. * gnu/services/vpn.scm (%openvpn-activation): Idem. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
482fda2729
commit
e57bd0bed8
6 changed files with 17 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016 Andy Wingo <wingo@pobox.com>
|
;;; Copyright © 2016 Andy Wingo <wingo@pobox.com>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -811,6 +812,7 @@ (define %cups-activation
|
||||||
;; Activation gexp.
|
;; Activation gexp.
|
||||||
(with-imported-modules '((guix build utils))
|
(with-imported-modules '((guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
(define (mkdir-p/perms directory owner perms)
|
(define (mkdir-p/perms directory owner perms)
|
||||||
(mkdir-p directory)
|
(mkdir-p directory)
|
||||||
(chown "/var/run/cups" (passwd:uid owner) (passwd:gid owner))
|
(chown "/var/run/cups" (passwd:uid owner) (passwd:gid owner))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
|
;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1601,6 +1602,7 @@ (define opensmtpd-activation
|
||||||
(($ <opensmtpd-configuration> package config-file)
|
(($ <opensmtpd-configuration> package config-file)
|
||||||
(let ((smtpd (file-append package "/sbin/smtpd")))
|
(let ((smtpd (file-append package "/sbin/smtpd")))
|
||||||
#~(begin
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
;; Create mbox and spool directories.
|
;; Create mbox and spool directories.
|
||||||
(mkdir-p "/var/mail")
|
(mkdir-p "/var/mail")
|
||||||
(mkdir-p "/var/spool/smtpd")
|
(mkdir-p "/var/spool/smtpd")
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -332,6 +333,7 @@ (define (ntp-service-activation config)
|
||||||
"Return the activation gexp for CONFIG."
|
"Return the activation gexp for CONFIG."
|
||||||
(with-imported-modules '((guix build utils))
|
(with-imported-modules '((guix build utils))
|
||||||
#~(begin
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
(define %user
|
(define %user
|
||||||
(getpw "ntpd"))
|
(getpw "ntpd"))
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -35,7 +36,9 @@ (define-record-type* <spice-vdagent-configuration>
|
||||||
|
|
||||||
(define (spice-vdagent-activation config)
|
(define (spice-vdagent-activation config)
|
||||||
"Return the activation gexp for CONFIG."
|
"Return the activation gexp for CONFIG."
|
||||||
#~(mkdir-p "/var/run/spice-vdagentd"))
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(mkdir-p "/var/run/spice-vdagentd")))
|
||||||
|
|
||||||
(define (spice-vdagent-shepherd-service config)
|
(define (spice-vdagent-shepherd-service config)
|
||||||
"Return a <shepherd-service> for spice-vdagentd with CONFIG."
|
"Return a <shepherd-service> for spice-vdagentd with CONFIG."
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -292,6 +293,7 @@ (define %openssh-accounts
|
||||||
(define (openssh-activation config)
|
(define (openssh-activation config)
|
||||||
"Return the activation GEXP for CONFIG."
|
"Return the activation GEXP for CONFIG."
|
||||||
#~(begin
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
(mkdir-p "/etc/ssh")
|
(mkdir-p "/etc/ssh")
|
||||||
(mkdir-p (dirname #$(openssh-configuration-pid-file config)))
|
(mkdir-p (dirname #$(openssh-configuration-pid-file config)))
|
||||||
|
|
||||||
|
@ -388,6 +390,7 @@ (define-record-type* <dropbear-configuration>
|
||||||
(define (dropbear-activation config)
|
(define (dropbear-activation config)
|
||||||
"Return the activation gexp for CONFIG."
|
"Return the activation gexp for CONFIG."
|
||||||
#~(begin
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
(mkdir-p "/etc/dropbear")))
|
(mkdir-p "/etc/dropbear")))
|
||||||
|
|
||||||
(define (dropbear-shepherd-service config)
|
(define (dropbear-shepherd-service config)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
|
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
|
||||||
|
;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -444,7 +445,9 @@ (define %openvpn-accounts
|
||||||
(shell (file-append shadow "/sbin/nologin")))))
|
(shell (file-append shadow "/sbin/nologin")))))
|
||||||
|
|
||||||
(define %openvpn-activation
|
(define %openvpn-activation
|
||||||
#~(mkdir-p "/var/run/openvpn"))
|
#~(begin
|
||||||
|
(use-modules (guix build utils))
|
||||||
|
(mkdir-p "/var/run/openvpn")))
|
||||||
|
|
||||||
(define openvpn-server-service-type
|
(define openvpn-server-service-type
|
||||||
(service-type (name 'openvpn-server)
|
(service-type (name 'openvpn-server)
|
||||||
|
|
Loading…
Reference in a new issue