[main]
@type = oneshot
@version = @vers@
@description = "Configure the hardware clock"
@user = ( root )
@options = ( !log )
@depends = ( 00 )

[start]
@execute =
(
    if { 66-yeller -cdp system-hwclock -1 /dev/console starts... }
    if -nt {

        execl-envfile ${conf_file}
        pipeline -d { echo ${HARDWARECLOCK} }
        pipeline { tr A-Z a-z }
        forstdin -- clock
        importas -iu clock clock
        hwclock --systz --${clock} --noadjfile

    }
    66-yeller -fcdp system-hwclock -1 /dev/console crashed!
)

[stop]
@execute=
(
    if { 66-yeller -cdp system-hwclock -1 /dev/console stops... }
    if -nt {

        execl-envfile ${conf_file}
        pipeline -d { echo ${HARDWARECLOCK} }
        pipeline { tr A-Z a-z }
        forstdin -- clock
        importas -iu clock clock
        hwclock --systohc --${clock}

    }
    66-yeller -fcdp system-hwclock -1 /dev/console crashed!

)

[environment]
conf_file=!@bootconf@
