FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 09-05-2008, 08:07 AM
Neil Bothwick
 
Default /etc/init.d/hwclock & /etc/init.d/ntp-client failed to start due to service dependency problem?

On Fri, 05 Sep 2008 10:24:25 +0800, Wang, Baojun wrote:

> depend section of /etc/init.d/hwclock, there is a line
>
> before *
>
> thus hwclock will start before modules (where I put rtc-cmos
> in /etc/conf.d/modules), so it will always fail to ajust hwclock.

Build it into the kernel. There's usually not much point in building
something as a module if you're going to load it every time you boot,
unless you want to pass it options.

> Besides, I'm using networkmanager (using gnome nm-applet) , so there
> is no /etc/init.d/net.eth* stuff, but ntp-client have a section of
>
> need net
>
> but at that time when ntp-client start, there is no network avaliable (I
> always get error will unable to reslove hostname XXX, so at least DNS is
> not usable at that time, even I put after NetworkManager
> in /etc/init.d/ntp-client).

Programs lime this and nfsmount should be started by NetworkManager's
Dispatcher so they start when a network interface comes up. This is how I
do it.

[nelz@krikkit ~ 0]% ls -l /etc/NetworkManager/dispatcher.d
total 4
lrwxrwxrwx 1 root root 10 2008-05-07 12:45 20-netmount -> default.sh
lrwxrwxrwx 1 root root 10 2008-05-07 12:45 30-nfsmount -> default.sh
lrwxrwxrwx 1 root root 10 2008-05-07 12:45 50-ntp-client -> default.sh
lrwxrwxrwx 1 root root 10 2008-05-07 12:45 70-ntpd -> default.sh
-rwxr-xr-x 1 root root 256 2008-05-07 12:51 default.sh

[nelz@krikkit ~ 0]% cat /etc/NetworkManager/dispatcher.d/default.sh
#!/bin/sh

service=$(basename $0 | cut -c4-)
[[ -e /etc/init.d/$service ]] || exit 0

if [[ "$2" == "up" ]] ; then
/etc/init.d/$service --quiet status || /etc/init.d/$service start
else
/etc/init.d/$service --quiet status && /etc/init.d/$service stop
fi


--
Neil Bothwick

Every time I jump on the bandwagon all its wheels fall off.
 
Old 09-05-2008, 04:01 PM
"James Ausmus"
 
Default /etc/init.d/hwclock & /etc/init.d/ntp-client failed to start due to service dependency problem?

On Fri, Sep 5, 2008 at 1:07 AM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Fri, 05 Sep 2008 10:24:25 +0800, Wang, Baojun wrote:
<snip>

> Build it into the kernel. There's usually not much point in building
> something as a module if you're going to load it every time you boot,
> unless you want to pass it options.

Not to sidetrack the thread, but this seems to be a bit of a common
misconception - you can pass *all* the same options to a built-in
driver via the kernel boot line as you can to the same driver built as
a module - you just do a $modulename.$optionname=$value on the boot
command line - very easy...

-James


<snip>


> --
> Neil Bothwick
>
> Every time I jump on the bandwagon all its wheels fall off.
>
 

Thread Tools




All times are GMT. The time now is 12:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org