Re: Run one-time startup script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Kai Schaetzl wrote:
> Changes largely involve removing old files and putting new files in place
> (resolv.conf, hosts, sysconfig/network + network-scripts, firewall,
> postfix, httpd etc.). The only other change besides replacing files would
> be changing the IP address in a webcontrol interface in a MySQL table, so
> this part has to be done after MySQL startup.

If I needed to do this, I would start by making a tarball
of all files that need to changed.  Then I would edit the
files as needed and make a tarball of the new version.

Next I would write two scripts, one to enable the new
settings and one to restore the old settings.  At the
end of each script restart network services.  Then
create an at job to enable the new settings at now+2min
and another to restore the former settings at now+7min.

In two minutes you should be able to ssh to the host
and cancel the second at job.  If anything goes wrong,
just wait 5 minutes and old network settings are back.

c


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux