From 6e5c0af87af40660307c4159ca6fabdb0fb71df9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A1s=20Korn?= Date: Thu, 4 Aug 2022 13:27:13 +0200 Subject: [PATCH] Avoid build error if etc/adjtime doesn't exist in chroot In scripts/GRMLBASE/18-timesetup, we assume etc/adjtime will definitely exist and error out if not. Make it so the lack of a /etc/adjtime file no longer prevents the grml build from completing. --- etc/grml/fai/config/scripts/GRMLBASE/18-timesetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup index da40243..d44efb2 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup +++ b/etc/grml/fai/config/scripts/GRMLBASE/18-timesetup @@ -13,7 +13,7 @@ set -e # by default it's set to UTC=no if [ -n "$UTC" ] && [ "$UTC" = "yes" ] ; then echo "UTC is set to 'yes', setting hwclock parameter UTC" - sed -i "s/^LOCAL/UTC/" "${target}/etc/adjtime" + [ -e "${target}/etc/adjtime" ] && sed -i "s/^LOCAL/UTC/" "${target}/etc/adjtime" fi # default timezone settings -- 2.1.4