diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2023-03-16 12:00:35 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2023-03-16 19:05:06 -0700 |
commit | 23497607bf7ec831dd57bf06bf6cd802c3ec6b8a (patch) | |
tree | cb92d5897434af338d9bd1cceb255ff1bb9fca69 /src/property | |
parent | 8fa41a15f184660ab5bda5f86d645ba9b2582389 (diff) | |
download | consfigurator-23497607bf7ec831dd57bf06bf6cd802c3ec6b8a.tar.gz |
new reader macros for shell- and Perl-style matching & replacement
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property')
-rw-r--r-- | src/property/cron.lisp | 2 | ||||
-rw-r--r-- | src/property/crypttab.lisp | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/property/cron.lisp b/src/property/cron.lisp index bba953f..e68b6ca 100644 --- a/src/property/cron.lisp +++ b/src/property/cron.lisp @@ -135,7 +135,7 @@ directory." (old (runlines :may-fail "crontab" "-l")) (new (mapcar - (lambda (line) (re:regex-replace-all #?/\$HOME/ line home)) + #~s/\$HOME/${home}/g (nconc (list "# Automatically updated by Consfigurator; do not edit" "") (loop for (k v) on env by #'cddr diff --git a/src/property/crypttab.lisp b/src/property/crypttab.lisp index cc44f50..6538409 100644 --- a/src/property/crypttab.lisp +++ b/src/property/crypttab.lisp @@ -25,10 +25,9 @@ (if (string= val "") nil val))) (defun get-device-parent (device) - (multiple-value-bind (match groups) - (re:scan-to-strings #?/^1\s+dependencies\s*:\s*\((\S+)\)$/ - (run "dmsetup" "deps" "-o" "blkdevname" device)) - (and match (merge-pathnames (elt groups 0) #P"/dev/")))) + (aand (#1~/^1\s+dependencies\s*:\s*\((\S+)\)$/ + (run "dmsetup" "deps" "-o" "blkdevname" device)) + (merge-pathnames it #P"/dev/"))) (defmethod ct-target ((volume opened-luks-container)) (volume-label volume)) |