operating-systems: buer: Use spawn-shell-command instead of system since a lambda action should be suspendable

Luis Guilherme Coelho 2024-11-25 03:30:48 -03:00
parent ab23d68de3
commit 771fc81d3e
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 5 additions and 4 deletions

View File

@ -30,10 +30,11 @@ next calendar event.")))
(start #~(make-timer-constructor
(calendar-event #:days-of-month '(1 15))
(lambda ()
(let* ((btrfs "/run/current-system/profile/bin/btrfs")
(let ((btrfs "/run/current-system/profile/bin/btrfs")
(date (strftime "%Y-%m-%d" (localtime (current-time)))))
(system* btrfs "subvolume" "snapshot" "/home"
(string-append "/snapshots/home/" date))))))
(spawn-shell-command
(string-append btrfs " subvolume snapshot"
" /home /snapshots/home/" date))))))
(stop #~(make-timer-destructor))
(actions (list timer-trigger-action))))