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.
signature.asc
Description: OpenPGP digital signature