2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 09:50:19 +00:00

Merge pull request #7032 from gurevichmark/localtime2

Make /etc/localtime a link
This commit is contained in:
besawn
2021-09-20 14:09:02 -04:00
committed by GitHub

View File

@ -655,7 +655,10 @@ sub copybootscript {
copy("$installroot/postscripts/xcatdsklspost", "$rootimg_dir/opt/xcat/xcatdsklspost");
if ($timezone[0]) {
unlink("$rootimg_dir/etc/localtime");
copy("$rootimg_dir/usr/share/zoneinfo/$timezone[0]", "$rootimg_dir/etc/localtime");
# Copy timezone file to /etc and link 'localtime' to it
mkpath(dirname("$rootimg_dir/etc/$timezone[0]"));
copy("$rootimg_dir/usr/share/zoneinfo/$timezone[0]", "$rootimg_dir/etc/$timezone[0]");
symlink("./$timezone[0]", "$rootimg_dir/etc/localtime");
}