Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
question about restarting net.eth0 and net.eth1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Fri Jul 16, 2004 7:18 am    Post subject: question about restarting net.eth0 and net.eth1 Reply with quote

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
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Fri Jul 16, 2004 8:27 am    Post subject: Reply with quote

Use restart instead of stop, or start them needed service manually.
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Fri Jul 16, 2004 9:34 am    Post subject: Reply with quote

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
View user's profile Send private message
netster
n00b
n00b


Joined: 08 Sep 2002
Posts: 41
Location: germany

PostPosted: Fri Jul 16, 2004 1:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Fri Jul 16, 2004 1:27 pm    Post subject: Reply with quote

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 life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
nahpets
Veteran
Veteran


Joined: 05 Oct 2003
Posts: 1178
Location: Montreal, Canada

PostPosted: Fri Jul 16, 2004 10:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum