* [gentoo-user] /etc/init.d/local - one thing led to another
@ 2005-08-31 0:31 John J. Foster
2005-08-31 1:26 ` Michael Crute
2005-08-31 3:50 ` A. Khattri
0 siblings, 2 replies; 6+ messages in thread
From: John J. Foster @ 2005-08-31 0:31 UTC (permalink / raw
To: Gentoo User
[-- Attachment #1: Type: text/plain, Size: 1119 bytes --]
Good evening all,
I figured it was about time to start the Guarddog firewall script
automatically, instead of always typing /etc/rc.firewall. The obvious
thing to do was add it to /etc/conf.d/local.start. Easy enough. But it
didn't start. OK, let's put a few logger commands in there and see where
it fails. Nothing logged. Nada. Zilch. Tried the same thing in the
/etc/init.d/local script. Once again, nothing logged. Here's the
beginning of the local script
depend() {
after *
}
start() {
ebegin "Starting local"
# Add any misc programs that should be started
# to /etc/conf.d/local.start
logger -p auth.info "This is right before local.start is sourced"
if [[ -e /etc/conf.d/local.start ]] ; then
source /etc/conf.d/local.start
fi
eend $? "Failed to start local"
}
The initial "Starting local" is displayed as the system boots, but
that's all that happens. If I do a /etc/init.d/local restart, all is
well, and all is logged.
Am I once again missing the obvious?
Thanks,
John
--
Contrary to the lie machine, the world is not safer.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] /etc/init.d/local - one thing led to another
2005-08-31 0:31 [gentoo-user] /etc/init.d/local - one thing led to another John J. Foster
@ 2005-08-31 1:26 ` Michael Crute
2005-08-31 13:56 ` John J. Foster
2005-09-01 12:53 ` John J. Foster
2005-08-31 3:50 ` A. Khattri
1 sibling, 2 replies; 6+ messages in thread
From: Michael Crute @ 2005-08-31 1:26 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]
On 8/30/05, John J. Foster <Gentoo-User@festus.150ml.com> wrote:
>
> Good evening all,
>
> I figured it was about time to start the Guarddog firewall script
> automatically, instead of always typing /etc/rc.firewall. The obvious
> thing to do was add it to /etc/conf.d/local.start. Easy enough. But it
> didn't start. OK, let's put a few logger commands in there and see where
> it fails. Nothing logged. Nada. Zilch. Tried the same thing in the
> /etc/init.d/local script. Once again, nothing logged. Here's the
> beginning of the local script
>
> depend() {
> after *
> }
>
> start() {
> ebegin "Starting local"
>
> # Add any misc programs that should be started
> # to /etc/conf.d/local.start
> logger -p auth.info <http://auth.info> "This is right before local.startis sourced"
> if [[ -e /etc/conf.d/local.start ]] ; then
> source /etc/conf.d/local.start
> fi
> eend $? "Failed to start local"
> }
>
> The initial "Starting local" is displayed as the system boots, but
> that's all that happens. If I do a /etc/init.d/local restart, all is
> well, and all is logged.
>
> Am I once again missing the obvious?
>
> Thanks,
> John
> --
> Contrary to the lie machine, the world is not safer.
>
>
>
You should use rc-update to run the startup script. Local is for commands
that you want run, not really a great way to run other startup scripts. The
command you want is probably `rc-update add rc.firewall default`.
-Mike
--
________________________________
Michael E. Crute
Software Developer
SoftGroup Development Corporation
Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"
[-- Attachment #2: Type: text/html, Size: 2260 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] /etc/init.d/local - one thing led to another
2005-08-31 0:31 [gentoo-user] /etc/init.d/local - one thing led to another John J. Foster
2005-08-31 1:26 ` Michael Crute
@ 2005-08-31 3:50 ` A. Khattri
1 sibling, 0 replies; 6+ messages in thread
From: A. Khattri @ 2005-08-31 3:50 UTC (permalink / raw
To: Gentoo User
On Tue, 30 Aug 2005, John J. Foster wrote:
> The initial "Starting local" is displayed as the system boots, but
> that's all that happens. If I do a /etc/init.d/local restart, all is
> well, and all is logged.
>
> Am I once again missing the obvious?
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=4#doc_chap2
--
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] /etc/init.d/local - one thing led to another
2005-08-31 1:26 ` Michael Crute
@ 2005-08-31 13:56 ` John J. Foster
2005-08-31 16:40 ` Michael Crute
2005-09-01 12:53 ` John J. Foster
1 sibling, 1 reply; 6+ messages in thread
From: John J. Foster @ 2005-08-31 13:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
On Tue, Aug 30, 2005 at 09:26:08PM -0400, Michael Crute wrote:
> >
> You should use rc-update to run the startup script. Local is for commands
> that you want run, not really a great way to run other startup scripts. The
> command you want is probably `rc-update add rc.firewall default`.
> -Mike
>
Thanks - I'll do this when I get home tonight. But a question remains.
Why didn't it work even if not the proper way of doing it? Why did a restart
of the /etc/init.d/local script work properly?
John
> --
> ________________________________
> Michael E. Crute
> Software Developer
> SoftGroup Development Corporation
>
> Linux, because reboots are for installing hardware.
> "In a world without walls and fences, who needs windows and gates?"
--
Contrary to the lie machine, the world is not safer.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] /etc/init.d/local - one thing led to another
2005-08-31 13:56 ` John J. Foster
@ 2005-08-31 16:40 ` Michael Crute
0 siblings, 0 replies; 6+ messages in thread
From: Michael Crute @ 2005-08-31 16:40 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
On 8/31/05, John J. Foster <Gentoo-User@festus.150ml.com> wrote:
>
>
> Thanks - I'll do this when I get home tonight. But a question remains.
> Why didn't it work even if not the proper way of doing it? Why did a
> restart
> of the /etc/init.d/local script work properly?
>
> I really couldn't say why it didn't work unless perhaps local is run as an
unprivileged user. I am pretty sure that's not the case so I'm not sure.
-Mike
--
________________________________
Michael E. Crute
Software Developer
SoftGroup Development Corporation
Linux, because reboots are for installing hardware.
"In a world without walls and fences, who needs windows and gates?"
[-- Attachment #2: Type: text/html, Size: 1021 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] /etc/init.d/local - one thing led to another
2005-08-31 1:26 ` Michael Crute
2005-08-31 13:56 ` John J. Foster
@ 2005-09-01 12:53 ` John J. Foster
1 sibling, 0 replies; 6+ messages in thread
From: John J. Foster @ 2005-09-01 12:53 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
On Tue, Aug 30, 2005 at 09:26:08PM -0400, Michael Crute wrote:
> >
> You should use rc-update to run the startup script. Local is for commands
> that you want run, not really a great way to run other startup scripts. The
> command you want is probably `rc-update add rc.firewall default`.
> -Mike
Last nigh I started to add rc.firewall to the default runlevel, but I
noticed that there was already an iptables script in /etc/init.d.
Reading through it, and it companion in /etc/conf.d, it became clear
that this seemed like the more elegant solution. So I did the following:
/root > /etc/rc.firewall # to start the guarddog firewall
/root > /etc/init.d/iptables save # to save the current state
/root > rc-update add iptables default # to start automatically
/root > reboot
At first this didn't work because the rc.firewall script loaded necessary
kernel modules for ip-conntrack, etc... I decide to build that
capability into the kernel instead of using modules.
All is working right now, and I don't have to worry about any changes
made to guarddog, as the iptables script saves state before shutting
down.
Thanks for the pointers,
John - who realizes that he needs a better understanding of initscripts
--
Contrary to the lie machine, the world is not safer.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-09-01 12:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-31 0:31 [gentoo-user] /etc/init.d/local - one thing led to another John J. Foster
2005-08-31 1:26 ` Michael Crute
2005-08-31 13:56 ` John J. Foster
2005-08-31 16:40 ` Michael Crute
2005-09-01 12:53 ` John J. Foster
2005-08-31 3:50 ` A. Khattri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox