public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Raymond Lewis Rebbeck <dystopianray@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Restart network interfaces over SSH
Date: Sat, 29 Jul 2006 18:55:22 +0930	[thread overview]
Message-ID: <200607291855.23149.dystopianray@gmail.com> (raw)
In-Reply-To: <200607291220.02825.refract@9mhz.org>

On Saturday, 29 July 2006 18:50, Todor Pirov wrote:
> Hello,
> I have the following script which exchanges the IPs of two network
> adapters:
>
> [code]
> #!/bin/bash
>
> /usr/bin/cp /etc/conf.d/net-2 /etc/conf.d/net;
> /etc/init.d/net.eth1 stop;
> /etc/init.d/net.eth0 restart;
> /etc/init.d/net.eth1 start
> [/code]
>
> and a similar one with "/usr/bin/cp /etc/conf.d/net-1 /etc/conf.d/net;" in
> it to restore the original situation. In net-1 and net-2 config files the
> IPs of eth0 and eth1 are substituted.
> The problem is that when I run the script from eth1 via SSH it stops
> executing when the interface stops. If it is ran from eth0 it executes
> normally. Is there a way to tell bash not to stop executing commands if
> connection is broken or some more convenient gentoo-style way to exchange
> the IPs from SSH. TIA
>
> Todor

How about running the script in a screen session?

-- 
Raymond Lewis Rebbeck
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2006-07-29  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29  9:20 [gentoo-user] Restart network interfaces over SSH Todor Pirov
2006-07-29  9:25 ` Raymond Lewis Rebbeck [this message]
2006-07-29  9:43   ` Todor Pirov
2006-07-29  9:46   ` Alexander Skwar
2006-07-29  9:40 ` Uwe Thiem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607291855.23149.dystopianray@gmail.com \
    --to=dystopianray@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox