On Mon, 21 Oct 2024 at 19:02, Gaël PORTAY <[email protected]> wrote:

> Or, linking the file instead:
>
>         rootfs_update_timestamp () {
>                 if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
>                         # Convert UTC into %4Y%2m%2d%2H%2M%2S
>                         sformatted=`date -u -d 
> @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S`
>                 else
>                         sformatted=`date -u +%4Y%2m%2d%2H%2M%2S`
>                 fi
>                 echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp
>                 bbnote "rootfs_update_timestamp: set /etc/timestamp to 
> $sformatted"
>         +
>         +       if [ -x /lib/systemd/systemd ]; then
>         +           ln -sf /etc/timestamp /usr/lib/clock-epoch
>         +       }
>         }
>
> Does it look better for you?

This does look better, yes. Will systemd follow the symlink and read
the mtime of the original file?

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#206128): 
https://lists.openembedded.org/g/openembedded-core/message/206128
Mute This Topic: https://lists.openembedded.org/mt/109095282/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to