Subject: [netatalk-admins] netatalk not up on reboot

From: Danny Rice <[email-masked]>
Date: Tue, 2 Jun 1998 17:26:16 +0200 (DST)

I am using RedHat Linux 5.0 and have the following line at the bottom
of /etc/rc.d/rc.local to start netatalk at reboot:

/etc/rc.d/init.d/atalk.init start

After reboot the server does not show up on the mac machine.  If I
type:

/etc/rc.d/init.d/atalk.init restart

it does.  Typing /etc/rc.d/init.d/atalk.init start after reboot will
also work.  Any suggestions?

-- 
Danny Rice

---

From: Marc Matteo <[email-masked]>
Date: Tue, 02 Jun 1998 08:48:50 -0700 (PDT)

> /etc/rc.d/init.d/atalk.init start

I don't have a direct answer for you but rather a question as to why you don't
use the SYSV init scripts since you're half way there now?

In other words if you made a symlink from /etc/rc.d/init.d/atalk.init to
/etc/rc.d/rc3.d/S90atalk then it would start when you entered run level 3
(standard console).

You can also use Red Hat's runlevel editor (in the control-panels) to do
the same thing (only easier).

I have noticed, come to think of it, that on my Red Hat 5.0 system I've had to
use the . notation to source other shell scripts... that may help too.

Marc

Marc Matteo
Web Engineer, The Sacramento Bee
http://www.sacbee.com/

---

From: Vivek <[email-masked]>
Date: Tue, 2 Jun 1998 17:04:43 +0100 (BST)

> also work.  Any suggestions?

Are afpd/atalkd actually starting after the rc file has run its course?
Also, are these processes being started in the background? afpd can't be
started until atalkd has finished setting up: IIRC you have to run atalkd
in the foreground and wait for it to detach before starting afpd.

What's actually in your '/etc/rc.d/init.d/atalk.init' ?

Does anything get run after rc.local that atalkd/afpd might need?

-- 
I dunno about the Big Bang. The Big Kludge I can believe in.

---

From: Danny Rice <[email-masked]>
Date: Tue, 2 Jun 1998 16:33:40 +0200 (DST)

> Are afpd/atalkd actually starting after the rc file has run its
course?

yes

 > Also, are these processes being started in the background?

no

> afpd can't be

it seems to work now on reboot.  I added the 'sleep 5' before afpd is
started.  atalkd is started interactively and takes a long time, but I 
thought maybe afpd was started too soon after atalkd finished.  Is it
possible that this 'sleep 5'  is making it work now?

Here is what "atalk.init start" does.  daemon is a sh function that
starts jobs in the forground.

case "$1" in
  start)
	echo -n "Starting AppleTalk services: "
	daemon atalkd
	nbprgstr -p 4 "${ATALK_NAME}:Workstation"
	nbprgstr -p 4 "${ATALK_NAME}:netatalk"
	daemon papd
	sleep 5
	daemon afpd ${AFPD_NOCLR} ${AFPD_NOAFS} ${AFPD_NOKRB} ${AFPD_NOGUEST} \
		    -g ${AFPD_GUEST} -c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}
	echo
	touch /var/lock/subsys/atalk
	;;

 > Does anything get run after rc.local that atalkd/afpd might need?

No, but I load a network driver module and do the ifconfig and routes
in rc.local before atalk.init, and I guess this is necessary before
atalk.init, yes?.

-- 
Danny Rice

---

From: Vivek <[email-masked]>
Date: Wed, 3 Jun 1998 10:54:07 +0100 (BST)

[snip]

> 	touch /var/lock/subsys/atalk

I suppose the sleep 5 might be giving something enough time: what does
'daemon' do? Is it possible that 'daemon' shunts atalkd into the
background? This would explain why 'sleep 5' worked. [I'm guessing now;
Anyone care to shed any light?]
 
-- 
If voting could change things, it would be illegal.