Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 28856 - no dependency for crontab driven init.d scripts with baselayout-1.8.6.10-r1
Summary: no dependency for crontab driven init.d scripts with baselayout-1.8.6.10-r1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-16 02:44 UTC by Andrea Barisani (RETIRED)
Modified: 2004-02-14 05:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrea Barisani (RETIRED) gentoo-dev 2003-09-16 02:44:35 UTC
Ok, I've just upgraded to baselayout-1.8.6.10-r1 and using dcron-2.9 now my
crontab entry

0 * * * * /etc/init.d/firewall stop ; /etc/init.d/firewall start 

produces the following error in my logs:

 rc-scripts: Could not get dependency info for "firewall"!
 rc-scripts: Please run:
 rc-scripts:   # /sbin/depscan.sh

Running depscan doesn't solve the problem because the script already has correct
dep info, so I guessed that's something to do with shell environment and I found
that
using:

0 * * * * /bin/sh -c /etc/init.d/firewall stop ; /bin/sh -c /etc/init.d/firewall
start

solve the problem. However that's odd because dcron always issue commands with
/bin/sh -c, what's happening? What has changed with the latest baselayout release?

I'll investigate further but I would appreciate some feedback.

Thanks

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2003-09-17 03:09:03 UTC
Does it do it every time or only the first time the script runs?
Comment 2 Andrea Barisani (RETIRED) gentoo-dev 2003-09-17 03:13:14 UTC
Every time :(
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-09-17 14:04:09 UTC
Works fine with vcron.
Comment 4 Andrea Barisani (RETIRED) gentoo-dev 2003-09-22 05:56:31 UTC
I've made further tests and it seems that the sample conf I've posted works only partially.

In fact only the first command works! (firewall stop)

0 * * * * /bin/sh -c /etc/init.d/firewall stop ; /bin/sh -c /etc/init.d/firewall start

So I've tried with

0 * * * * /bin/sh -c '/etc/init.d/firewall stop ; /etc/init.d/firewall start'

and now works.

However this is a major pain in the ass if admins are using dcron, and I beleive that
stopping starting services from crontab it's a common practice (at least for me :) ).

I'm changing severity to major...
I'll inspect differences between current and previous baselayout to see what has changed.
Comment 5 Arthur Ward 2003-10-16 08:41:30 UTC
I noticed this behavior in my apmd scripts where I shut down and restart
my integrated wireless on suspend/standby events (in past versions of wlan-ng,
it hasn't dealt with waking up the wireless hardware very well on my laptop).
I haven't tried the /bin/sh -c suggestion yet.
Comment 6 Arthur Ward 2003-10-17 13:17:59 UTC
Followup on apmd scripts exhibiting this behavior: using " /bin/sh -c '/etc/init.d/wlan
start' " instead of the bare script makes no difference in my apmd eventsink
file.
Comment 7 Andrea Barisani (RETIRED) gentoo-dev 2004-02-14 05:36:39 UTC
This seems solved with latest stable baselayout. I'm closing it for now.