# Issue (bug?) with need dependency in Init System script

## MoonWalker

The need dependency type don't seam to it's job as said in the online "Gentoo Linux Documentation - Gentoo Linux 1.0 Init System" and in this case (at least) seam to effect the working of courier pop3d.

Documentation says...

 *Quote:*   

> The NEED dependency type
> 
> This is used if a service is critical for the startup of the current service.
> 
> (Codelisting 2:... choped)
> ...

 

/etc/init.d/courier-pop3d have 

```
depend() {

        need net authdaemond

}
```

It fails in 2 ways according to documentation,

1. authdaemond never get started if not running when courier-pop3d starts, instead you have to start it manually which I think shouldn't be the case. 

2. as authdeamond not start or is running, courier-pop3d should fail to start, but it don't. It starts and any attempt to connect to pop3 generates an auth failure.

I'm not good enough to decide which one is failing, Gentoo Init System or courier-pop3d script, possibly both. So though of hearing here first before supplying a bug report.

/Joakim

----------

## Nitro

I actually updated the courier-imap ebuild to include pop3 and authdaemon init scripts.  So, it could be my fault. <shrug>.

 *Quote:*   

> 1. authdaemond never get started if not running when courier-pop3d starts, instead you have to start it manually which I think shouldn't be the case. 
> 
> 2. as authdeamond not start or is running, courier-pop3d should fail to start, but it don't. It starts and any attempt to connect to pop3 generates an auth failure. 

 

Yes, you are correct, on my system and several others I have as expected behavior.

The first thing that comes to my mind is, did you *just* emerge courier-imap?  If you did, then the problem is simpe (or should be), simply run /etc/init/depscan.sh.  By simply installing a program the init dependencies do not get rebuilt, they get rebuilt at boot time, and whenever you use rc-update.  Hopefully this should solve the problem.

----------

## MoonWalker

 *Quote:*   

> Yes, you are correct, on my system and several others I have as expected behavior. 
> 
> The first thing that comes to my mind is, did you *just* emerge courier-imap? If you did, then the 

 

Well I emerged and followed the instructions given post install, shouldn't that be *just* enough?  :Smile: 

btw, may I take the oportunity here to point out a weakness with portage in current status (if not changed with latest). If you emerge several packages or lets say there is many deps, you only get the "post install" instructions for the latest package emerged in the end screen. I don't know it may be written to disk somewere, but then it should be fairly easy to make a "sum up" in the end of the emerge. Found out this when I didn't get something to work alright and now always check the ebuild script(s) in portage afterwards, but it's a bit awkward...

 *Quote:*   

> ? If you did, then the problem is simpe (or should be), simply run /etc/init/depscan.sh. By simply installing a program the init dependencies do not get rebuilt, they get rebuilt at boot time, and whenever you use rc-update. Hopefully this should solve the problem.

 

Ok I see my short time with Gentoo still shows off  :Wink:  Although I have had a busy week with it as my Suse 7.2 production server crached last thursday, right after we had that discussion in hardware and I had ordered peices to a new server. So I took the oportunity to plug in the HD with the half done configurated Gentoo system I played with here at home so now I'm fully Gentoonized - havn't had time for the fine details of everything yet though but fighting with getting services back up working again. Regarding reboot, I'm 70km away from my server administrating it remotely with ssh and webmin, so being so new with it a remote reboot is not an option for me right now. But good to know, I will go ther within some time and then I'll find out.

/Joakim

----------

## Nitro

 *MoonWalker wrote:*   

> 
> 
> btw, may I take the oportunity here to point out a weakness with portage in current status (if not changed with latest). If you emerge several packages or lets say there is many deps, you only get the "post install" instructions for the latest package emerged in the end screen. I don't know it may be written to disk somewere, but then it should be fairly easy to make a "sum up" in the end of the emerge. Found out this when I didn't get something to work alright and now always check the ebuild script(s) in portage afterwards, but it's a bit awkward...
> 
> 

 

Yeah, I know.  :Sad:   We need some logging facilities, they will probably get added after the QA stuff gets finished.

----------

## Nitro

 *MoonWalker wrote:*   

> Well I emerged and followed the instructions given post install, shouldn't that be *just* enough? 

 

Just updated the ebuild to run /etc/init.d/depscan.sh in pkg_postinst just before we print out the little message.  Shouldn't be a problem anymore.

----------

