I swear I knew this once upon a time... How can I force the sequence ifdown / ifup-dhcp on a machine that is remote (accessed thru ssh)? I will lose connection as soon as I do the ifdown... (The local ISP does static IP assignments via reservations in their dhcp servers, and I need to cycle the external interface in order to pick up the new assignment. ) -- ______________________________________ John Andersen NORCOM / Juneau, Alaska http://www.screenio.com/ (907) 790-3386 . ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
John S. Andersen wrote:> I swear I knew this once upon a time... > > How can I force the sequence ifdown / ifup-dhcp on a > machine that is remote (accessed thru ssh)? > > I will lose connection as soon as I do the ifdown... > > (The local ISP does static IP assignments via reservations > in their dhcp servers, and I need to cycle the external > interface in order to pick up the new assignment. )Try running under screen, and "type" all the commands ahead of time - i.e. run this: ifdown x ; ifup-dhcp x or: ifdown x && ifup-dhcp x I guess the first is safer... ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
If you''re feeling brave, try: ifdown-eth0 && ifup-eth0 That should run ifup-eth0 immediately after ifdown-eth0. What you might want to do is run Screen, and have a ''timebomb'' running before you try this. This will reboot the server in the event of the script not working: type ''screen'' [enter] type ''wait 1800 && shutdown -r now''. This will set a 30-minute timebomb. then press ctrl-D (this ''detaches'' your console from the screen session and gives you a normal console back) then type ''ifdown-eth0 && ifup-eth0''... press enter, and pray. When the connection gets terminated, reconnect, log in, and type ''screen -r''. this will re-attach you to your screen session, with your command still in the window. press ctrl-c to stop the timebomb, and type ''exit'' to exit screen. That''s it! Hope this helps - and please excuse the ''foolproof'' instructions. Regards, Jan Mulders On 28/08/06, John S. Andersen <jsa@norcomix.dyndns.org> wrote:> > I swear I knew this once upon a time... > > How can I force the sequence ifdown / ifup-dhcp on a > machine that is remote (accessed thru ssh)? > > I will lose connection as soon as I do the ifdown... > > (The local ISP does static IP assignments via reservations > in their dhcp servers, and I need to cycle the external > interface in order to pick up the new assignment. ) > -- > ______________________________________ > John Andersen > NORCOM / Juneau, Alaska > http://www.screenio.com/ > (907) 790-3386 > > . > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Shorewall-users mailing list > Shorewall-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/shorewall-users >------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
On 8/28/06, Jan Mulders <lastchancehotel@gmail.com> wrote:> If you''re feeling brave, try: > > ifdown-eth0 && ifup-eth0 > > That should run ifup-eth0 immediately after ifdown-eth0. > > What you might want to do is run Screen, and have a ''timebomb'' running > before you try this. This will reboot the server in the event of the script > not working: > > > type ''screen'' [enter] > > type ''wait 1800 && shutdown -r now''. This will set a 30-minute timebomb. > > then press ctrl-D (this ''detaches'' your console from the screen session and > gives you a normal console back)Just for the sake of completness, this should read press ctrl-A, then D.> then type ''ifdown-eth0 && ifup-eth0''... press enter, and pray. > > When the connection gets terminated, reconnect, log in, and type ''screen > -r''. this will re-attach you to your screen session, with your command still > in the window. press ctrl-c to stop the timebomb, and type ''exit'' to exit > screen. > > That''s it! > > Hope this helps - and please excuse the ''foolproof'' instructions. > > Regards, > > Jan Mulders > >~David ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
On 28 Aug 2006 at 20:59, Jan Mulders wrote: > type ''screen'' [enter]> > type ''wait 1800 && shutdown -r now''. This will set a 30-minute > timebomb.Well, if I was free to reboot the system I would not be asking the question... But thanks for the other bit about screen. -- ______________________________________ John Andersen NORCOM / Juneau, Alaska http://www.screenio.com/ (907) 790-3386 . ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642