mapped-devices: Use 'cryptsetup-static' in 'luks-device-mapping'.
* gnu/system/mapped-devices.scm (open-luks-device): Use CRYPTSETUP-STATIC instead of CRYPTSETUP. Use 'file-append'. (close-luks-device): Likewise.
This commit is contained in:
parent
fe93383350
commit
b7d408ec1b
|
@ -23,7 +23,7 @@
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:use-module (gnu services)
|
#:use-module (gnu services)
|
||||||
#:use-module (gnu services shepherd)
|
#:use-module (gnu services shepherd)
|
||||||
#:autoload (gnu packages cryptsetup) (cryptsetup)
|
#:autoload (gnu packages cryptsetup) (cryptsetup-static)
|
||||||
#:autoload (gnu packages linux) (mdadm-static)
|
#:autoload (gnu packages linux) (mdadm-static)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (ice-9 match)
|
#:use-module (ice-9 match)
|
||||||
|
@ -104,7 +104,9 @@
|
||||||
((gnu build file-systems)
|
((gnu build file-systems)
|
||||||
#:select (find-partition-by-luks-uuid)))
|
#:select (find-partition-by-luks-uuid)))
|
||||||
|
|
||||||
(zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
|
;; Use 'cryptsetup-static', not 'cryptsetup', to avoid pulling the
|
||||||
|
;; whole world inside the initrd (for when we're in an initrd).
|
||||||
|
(zero? (system* #$(file-append cryptsetup-static "/sbin/cryptsetup")
|
||||||
"open" "--type" "luks"
|
"open" "--type" "luks"
|
||||||
|
|
||||||
;; Note: We cannot use the "UUID=source" syntax here
|
;; Note: We cannot use the "UUID=source" syntax here
|
||||||
|
@ -120,7 +122,7 @@
|
||||||
|
|
||||||
(define (close-luks-device source target)
|
(define (close-luks-device source target)
|
||||||
"Return a gexp that closes TARGET, a LUKS device."
|
"Return a gexp that closes TARGET, a LUKS device."
|
||||||
#~(zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
|
#~(zero? (system* #$(file-append cryptsetup-static "/sbin/cryptsetup")
|
||||||
"close" #$target)))
|
"close" #$target)))
|
||||||
|
|
||||||
(define luks-device-mapping
|
(define luks-device-mapping
|
||||||
|
|
Loading…
Reference in New Issue