Feature #308

create a script to change the network and the gateway

Added by cpg almost 12 years ago. Updated almost 12 years ago.

Target version:
Start date:
Due date:
% Done:



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.


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

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!


#1 Updated by essary almost 12 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 almost 12 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