Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hardwareclock
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2640

PostPosted: Wed Sep 20, 2017 2:34 pm    Post subject: Hardwareclock Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43359
Location: 56N 3W

PostPosted: Wed Sep 20, 2017 2:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2640

PostPosted: Wed Sep 20, 2017 4:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5852

PostPosted: Wed Sep 20, 2017 4:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2640

PostPosted: Sat Sep 23, 2017 5:41 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum