From 7e6303a85bbb44051fb1fc89003cc0e67d15d582 Mon Sep 17 00:00:00 2001 From: besawn <38794505+besawn@users.noreply.github.com> Date: Wed, 1 Dec 2021 09:14:37 -0500 Subject: [PATCH] Print warning from packimage when timezone setup fails --- xCAT-server/lib/xcat/plugins/packimage.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index ef7c11ce2..f3eae9f45 100755 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -351,6 +351,10 @@ sub process_request { # Add the zoneinfo to the include list $excludetext .= "+./usr/share/zoneinfo/$timezone[0]\n"; + + if (not stat "$rootimg_dir/etc/localtime") { + $callback->({ warning => ["Unable to set timezone to \'$timezone[0]\', check this is a valid timezone"] }); + } } else { $callback->({ info => ["No timezone defined in site table, skipping timezone configuration"] }); }