Hi guys,
I'm using BackTrack4 in my office to run a MySql server for internal testing purposes and it's working fairly well till now with 1 inconvenience that it doesn't autostart. Sometimes I have to shutdown the server and after booting again certain parameters like ip address, mounting a separate HDD partition etc. get reset and I have to manually assign IP, mount partition, start required services like Mysql, SSH again.
Is there any way to avoid that ? That is, to assign the same network configuration, starting of certain services and auto-mounting the partition ?
For setting ip address I tried editing "
/etc/network/interfaces" like this:
Quote:
auto lo
iface lo inet loopback
face eth0 inet static
address 192.168.1.111
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
auto eth1
iface eth1 inet dhcp
<snip>
|
For auto start of services, I edited
rc.local file and added the commands
Quote:
and so on.
But both didn't work. Can someone point out the correct way of doing it ? I read some cryptic (to me) article where they were using scripts to do similar stuff, but all that is beyond me. Even if I could somehow manage to write a script to automatically do all that in case of an unexpected reboot (which I don't know how to :o) how'll that script run by itself automatically ?