From 519c4dbd5a6ce576db4adf40c973b97c0d62b8c2 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 27 Jun 2021 14:24:42 -0700 Subject: add TIMEZONE:CONFIGURED-FROM-PARENT Signed-off-by: Sean Whitton --- src/property/timezone.lisp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/property/timezone.lisp') diff --git a/src/property/timezone.lisp b/src/property/timezone.lisp index f0d8d10..6474b3d 100644 --- a/src/property/timezone.lisp +++ b/src/property/timezone.lisp @@ -21,6 +21,7 @@ (defproplist configured :posix (timezone) "Set the system timezone. TIMEZONE is a relative path under /usr/share/zoneinfo, e.g. \"Europe/London\"." + (:hostattrs (push-hostattrs 'timezone timezone)) (os:etypecase (linux (file:symlinked :from "/etc/localtime" @@ -29,3 +30,8 @@ e.g. \"Europe/London\"." (os:debianlike (on-change (file:has-content "/etc/timezone" (list timezone)) (apt:reconfigured "tzdata"))))) + +(defproplist configured-from-parent :posix () + "Sets the system timezone to match the parent host's." + (configured (or (get-parent-hostattrs-car 'timezone) + (failed-change "Parent has no known timezone")))) -- cgit v1.2.3