#! /bin/bash

touch /tmp/linglong_fix_localtime || true

cat - | jq '
    ((.mounts[] | select(.destination=="/etc/localtime") | .options) |= ["copy-symlink"])
    | .mounts += [{"destination": "/etc/linglong_fix_localtime", "source": "/tmp/linglong_fix_localtime", "type": "bind", "options": ["rbind"]}]'
