Yes the code for this appears to be in function copybootscript()
in /opt/xcat/lib/perl/xCAT_plugin/packimage.pm
my @timezone = xCAT::TableUtils->get_site_attribute("timezone");
:
:
:
if ($timezone[0]) {
unlink("$rootimg_dir/etc/localtime");
copy("$rootimg_dir/usr/share/zoneinfo/$timezone[0]",
"$rootimg_dir/etc/localtime");
}
:
:
:
Mark Gurevich
Poughkeepsie Development Lab
HPC Software Development - xCAT
"If we knew what it was we were doing, it would not be called research,
would it?"
--Albert Einstein
From: "Thomas HUMMEL" <[email protected]>
To: <[email protected]>
Date: 08/05/2021 10:21 AM
Subject: [EXTERNAL] [xcat-user] packimage -m tar and /etc/localtime
Hello,
I'm using xCAT-2.16.2 on CentOS 8.3 x86_64. For stateless image
building, I'm using the packimage '-m tar' option because cpio does not
support linux xattrs which has 2 consequences :
- warning messages from dracut on image de-packing (has no xattr to set)
- more important : no xattrs in the live image, hence no capabilities
(ex: ping, which uses the latter, can not run as non root anymore - on
older CentOSes, it was set-uid set)
Anyway, that's why I decided to use -m tar.
I want my timezone to be set to Europe/Paris (which I do by creating the
following symlink via ansible into the chroot
/etc/localtime -> /usr/share/zoneinfo/Europe/Paris
[by default, just after genimage it pointed to the UTC timezone]
However packimage -m tar seems to override this link (I reckon setting
the timezone defined in the site table ? - which in my case is also
Europe/Paris) but *as a regular file*
So I end up with the correct timezone but with a regular file as
/etc/localtime instead of a symbolic link (which some software complain
about), both into the chroot and its archive.
Can you help me figuring out what exactly is going on and how to fix it ?
Thanks for your help
--
Thomas HUMMEL
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user
_______________________________________________
xCAT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xcat-user