View previous topic :: View next topic |
Author |
Message |
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Fri Jul 16, 2004 7:18 am Post subject: question about restarting net.eth0 and net.eth1 |
|
|
I have two network interfaces, eth0 and eth1. This is what I get when I stop eth0 and eth1:
Code: |
# /etc/init.d/net.eth0 stop
* Bringing eth0 down... [ ok ]
# /etc/init.d/net.eth1 stop
* Unmounting network filesystems... [ ok ]
* Stopping ntpd... [ ok ]
* Stopping spamd... [ ok ]
* Stopping sshd... [ ok ]
* Bringing eth1 down...
|
notice how sshd, spamd and ntpd stop when I do this. Now, when I restart net.eth0 and then net.eth1, I get this:
Code: |
# /etc/init.d/net.eth0 start
* Bringing eth0 up (XXX.XXX.XX.XX)... [ ok ]
* Setting default gateway (XXX.XXX.XX.XXX)...
# /etc/init.d/net.eth1 start
* Bringing eth1 up (XXX.XXX.X.X)...
|
So why didn't sshd, ntpd and spamd get restarted? They used to be restarted when I only had one NIC. Does anyone know how to fix this? I need sshd to restart because sometimes I or do a "/etc/init.d/net.eth0 restart" remotely and I need sshd to come back up. |
|
Back to top |
|
|
Suicidal l33t
Joined: 30 Jul 2003 Posts: 959 Location: /dev/null
|
Posted: Fri Jul 16, 2004 8:27 am Post subject: |
|
|
Use restart instead of stop, or start them needed service manually. |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Fri Jul 16, 2004 9:34 am Post subject: |
|
|
I tried restart and it did the same thing. As I said, manual restarting isn't an option because I won't be able to do it remotely if sshd isn't running. |
|
Back to top |
|
|
netster n00b
Joined: 08 Sep 2002 Posts: 41 Location: germany
|
Posted: Fri Jul 16, 2004 1:22 pm Post subject: |
|
|
hmmmm tried a service-script for this ? sry for poor coding, but a try .. nothing more
Code: | #!/sbin/runscript
start() {
ebegin "Starting services-reboot-script"
net.eth0 --stop && net.eth1 --stop && ntpd --stop && spamd --stop && sshd --stop
eend $?
}
stop() {
ebegin "Stopping services-reboot-script"
sshd --stop && ntpd --stop && spamd --stop && net.eth1 --stop && net.eth0 --stop
eend $?
} |
|
|
Back to top |
|
|
davidblewett Apprentice
Joined: 15 Feb 2004 Posts: 274 Location: Indiana
|
Posted: Fri Jul 16, 2004 1:27 pm Post subject: |
|
|
You can do: Code: | #/etc/init.d/net.eth0 restart && /etc/init.d/sshd start |
_________________ No guilt in life, no fear in death
this is the power of Christ in me
From lifes first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album" |
|
Back to top |
|
|
nahpets Veteran
Joined: 05 Oct 2003 Posts: 1178 Location: Montreal, Canada
|
Posted: Fri Jul 16, 2004 10:19 pm Post subject: |
|
|
davidblewett wrote: | You can do: Code: | #/etc/init.d/net.eth0 restart && /etc/init.d/sshd start |
|
ahhh... so obvious a solution I didn't see it!! Thanks a million. Although I'd still like it to be automatically restarted like it used to be, but I guess this will have to do in the meantime. |
|
Back to top |
|
|
|