From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 89A9F198005 for ; Thu, 28 Feb 2013 15:38:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 296A1E073C; Thu, 28 Feb 2013 15:38:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DABDDE064E for ; Thu, 28 Feb 2013 15:38:01 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: floppym) by smtp.gentoo.org (Postfix) with ESMTPSA id 07D9E33DC34 for ; Thu, 28 Feb 2013 15:38:00 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id 13so2264924iea.28 for ; Thu, 28 Feb 2013 07:37:59 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.50.217.167 with SMTP id oz7mr10215258igc.26.1362065879056; Thu, 28 Feb 2013 07:37:59 -0800 (PST) Received: by 10.64.102.66 with HTTP; Thu, 28 Feb 2013 07:37:58 -0800 (PST) In-Reply-To: <512F4FAD.5040304@gmail.com> References: <512EE182.7030209@gmail.com> <512F4FAD.5040304@gmail.com> Date: Thu, 28 Feb 2013 10:37:58 -0500 Message-ID: Subject: Re: [gentoo-user] Changing static IP remotely... From: Mike Gilbert To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 3967cd28-cf6b-4362-8e5b-e21496719190 X-Archives-Hash: 9cdbb4ef535c19b31b16cea4b446bf12 On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol wrote: > On 02/27/2013 11:48 PM, Jarry wrote: >> Hi Gentoo users, >> >> what is the proper way of changing static IP-address remotely >> without the need to restart the whole system (or locking >> me out)? >> >> I have one interface with static IP, so first I'm going to edit >> /etc/conf.d/net. Then I will set up command for later execution: >> >> # echo '#!/bin/bash' > /root/eth-restart >> # echo '/etc/init.d/net.eth0 restart' >> /root/eth-restart >> # chmod 0700 /root/eth-restart >> # at -f /root/eth-restart now + 5 min >> >> Then I terminate my ssh-session hoping 5 minutes later >> I can connect using new IP. Is this correct and all that >> is necessary? >> >> Jarry > > Probably the safest thing you can do is give the interface two IPs at > once (both the old address and the new address) until you can confirm > you can connect on the new IP, and then remove the old IP. > > Also, rather than using at to handle things like that, I like to use > screen; if I get disconnected, programs running inside the screen > session don't die...and there's no waiting for a scheduled job. > Yeah, screen or tmux is the way to go.