Skip to content

swclock init: may send the clock backwards of current deptree reference. #675

Open
@macmpi

Description

At first run (openrc-shutdowntime does not exist), swclock sets time according to openrc-run file mtime.

	if ! swclock "${swclock_file}" 2> /dev/null; then
	swclock --warn @SBINDIR@/openrc-run

Until then mtime reference for deptree was based on latest mtime found in RC_INITDIR, RC_CONFDIR, RC_CONF & al.
In some circumstances it may actually happen openrc-run mtime predates such calculated deptree date and therefore cause transitional havoc in service starts after swclock kicks-in (flock issues): one exemple is described there.

What would be the best approach to avoid that?

  • set same arbitrary mtime for all open-rc files?
  • add openrc-run in the list of deptree inspected locations to set initial mtime?
  • have swclock use another default openrc file from deptree inspected locations, to set its first-time time reference in consistent manner?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions