View previous topic :: View next topic |
Author |
Message |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3686
|
Posted: Wed Sep 20, 2017 2:34 pm Post subject: Hardwareclock |
|
|
For hardware clock, I am using the kernel options CONFIG_RTC_HCTOSYS and CONFIG_RTC_SYSTOHC and so removed hwclock from the runlevels.
But surprisingly there it is again as a needed/wanted: rc-config show --unused | grep started: | hwclock [started]
lvmetad [started]
modules [started]
modules-load [started]
|
rc-status --all: | Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed/wanted
lvmetad [ started ]
modules [ started ]
modules-load [ started ]
hwclock [ started ]
Dynamic Runlevel: manual
|
Why is it needed/wanted? I intentionally removed it from the runlevels ... |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55196 Location: 56N 3W
|
Posted: Wed Sep 20, 2017 2:56 pm Post subject: |
|
|
charles17,
Here, I get
Code: | $ grep hwclock /etc/init.d/*
/etc/init.d/hwclock:# hwclock doesn't always return non zero on error
/etc/init.d/hwclock:_hwclock()
/etc/init.d/hwclock: local err="$(hwclock "$@" 2>&1 >/dev/null)"
/etc/init.d/hwclock: _hwclock --systz $utc_cmd $clock_args
/etc/init.d/hwclock: _hwclock --adjust $utc_cmd
/etc/init.d/hwclock: _hwclock --hctosys $utc_cmd $clock_args
/etc/init.d/hwclock: if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
/etc/init.d/hwclock: _hwclock --systohc $utc_cmd $clock_args
/etc/init.d/hwclock: hwclock --show "$utc_cmd" $clock_args
|
So nothing needs/depends on hwclock.
Do you get a different answer to the grep? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3686
|
Posted: Wed Sep 20, 2017 4:42 pm Post subject: |
|
|
Almost the same: $ grep hwclock /etc/init.d/*: | /etc/init.d/hwclock:# hwclock doesn't always return non zero on error
/etc/init.d/hwclock:_hwclock()
/etc/init.d/hwclock: local err="$(hwclock "$@" 2>&1 >/dev/null)"
/etc/init.d/hwclock: if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
/etc/init.d/hwclock: _hwclock --systz $utc_cmd $(get_noadjfile) $clock_args
/etc/init.d/hwclock: _hwclock --adjust $utc_cmd $(get_noadjfile)
/etc/init.d/hwclock: _hwclock --hctosys $utc_cmd $(get_noadjfile) $clock_args
/etc/init.d/hwclock: _hwclock --systohc $utc_cmd $(get_noadjfile) $clock_args
/etc/init.d/hwclock: hwclock --show "$utc_cmd" $(get_noadjfile) $clock_args
|
Where could I find more info about what it calls Dynamic Runlevel? |
|
Back to top |
|
 |
Ant P. Watchman

Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Sep 20, 2017 4:59 pm Post subject: |
|
|
hwclock has a "provide clock" line, something must be looking for that instead.
There's an /etc/init.d/osclock script specifically for this use case, just add that to the boot runlevel instead. |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3686
|
Posted: Sat Sep 23, 2017 5:41 am Post subject: |
|
|
Ah, that's the reason:
Code: | rc-config show --unused | grep started
/etc/init.d/sysklogd:8: need clock hostname |
Adding osclock indeed solves it. But why does sysklogd need clock when all other rc-services don't? |
|
Back to top |
|
 |
|