Project

General

Profile

Feature #308

create a script to change the network and the gateway

Added by cpg over 10 years ago. Updated over 10 years ago.

Status:
Assigned
Priority:
Medium
Assignee:
Category:
-
Target version:
-
Start date:
09/28/2009
Due date:
% Done:

100%


Description

here is a much needed perl script to change settings in the db for users that get stuck.
temporarily assigned to you in case you are interested. if not please send back to cpg.

hda-change-gw 192.168.30.50

changes the net in the db to 192.168.30 and the gateway to 192.168.30.50.

this would solve the problem for people who did not set it properly.

much better would be a piece of code that autodetects it and put it in the installer!

History

#1 Updated by essary over 10 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

I did both, the new script is called hda-change-gw and works exactly as your requirement stated. I also submitted a patch for autodetection of the network settings during install with hda-new-install

#2 Updated by cpg over 10 years ago

  • Status changed from Closed to Assigned

reopening. i tried it and it did not work.

my suggestion is to add the following at the end:

  • after the db changes, issue a hdactl-hup. this will make hdactl aware and generate the files, restart named (unfortunately, this will bork the servers, as eth0 has potentially wrong settings in the most general case)
  • sleep a second or two and issue a "service network restart" to restart the networking and let eth0 pick up the bits properly. at this point, dhcpd and named may be hosed, attached to the wrong ip
  • sleep a couple of seconds more and issue a hdactl-hup to let named and dhcpd restart with nice settings, this time on a good eth0!
  • print a message, strongly recommending the user to reboot all systems in the network, included the hda

Also available in: Atom