Linux Booting into X too quickly after Matrox power failure
I have a rather strange problem. I have a HP DL360 using Mageia 1, which uses a external Matrox graphics device (this device has its own power supply). The server powers up has runlevel 5, autologin for a user, bash_profile then checks if tty=1 if so then startx is called and the .xinitrc file is executed and my 2 applications start up. All is good.
I have discovered that if the matrox device is unplugged from the power and the server starts up you see nothing on the monitor, this is ok and as expected. I then power the matrox device on and restart the server. I get to the boot up screen ok, it defaults to my normal option then a load of writing on the screen goes past as normal until it stops at the output of the following line:
bash-hotplug (54) : /proc/54/oom_adjs is deprecated etc....
It then clears the screen and goes into X and opens up 2 xterm windows (which is how my applications are normally automatically started but are not as not in tty1 at this stage and no services have started), (It has also autologged as per my inittab file, not sure how when runlevel 3 hasn't started). I do not want this behaviour and it only happens after the server starts up without the matrox. Linux never goes to runlevel 3 or the line "Welcome to Mageia 1", never see a single line with a green [OK] at the end.
If in one of these 2 xterm windows I run init 3 as root user it takes me back to 'F1' console and continues booting up linux and my applications eventually come up ok. This would not be a problem but the application is a touchscreen application and by default there is no physical keyboard so the user cannot type init 3 to get in should the above matrox power issue occur.
This scenario never changes after any number of reboots. To get it back to the way it is suppose to run the server has to be completely rebuilt.
Any ideas why the 2 console windows might be starting up before init 3 has even started and none of the services (e.g. networking etc) have started? How do I stop it?
Thank you for reading