mii-tool autostart with redhat9
hi! ebery time when I start my rh9, i must use mii-tool to set my network media type to 10baseT-HD. So i have to go to mii-tool directory, and run:
./mii-tool -A 10baseT-HD /.mii-tool -F 10baseT-HD Can I do something, if i want to autorun these commands on startup? |
Hello,
Of course you can do that automatically at each boot :) You have to put the two lines in a script in /etc/rc.d/init.d/ directory (I am not sure for the path... but the final directory is init.d). Either you put it at the end of the networking script or you create a new script and in this case you have to make a symlink with the runlevel directory you run each time you boot :) (If I'm not clear enough, tell me). Hope this help you Oliv' |
Similar topic question. I'm running RH9.
How would I create a file to autostart some commands? I can create the file with the cmds in there & chmod to 755. Where do I place this file? Does it need a special name? How/where to I setup the symlink stuff? Thanks! |
Hello,
Quote:
Quote:
Quote:
Quote:
After this explanation, I have to add that your script can do both: start or kill a process. For example, my devfsd start/kill script: Code:
case "$1" in Code:
ln -s ../init.d/myscript S90myscript Hope this help you Oliv' |
So, I created a file called "symstart" in my init.d directory. The file has one line: "synergyc 1.2.3.4". I also did "chmod 755 symstart".
Then, I ran "ln -s ../init.d/synstart S90synstart" from the rc5.d directory. After rebooting, it didn't really work. The prg ran during logon but afterwards, wasn't running. (same status as before) Next, I tried the following, which resolved my problem (form some other post): /etc/X11/gdm/PreSession/Default add the lines code:-------------------------------------------------------------------------------- # Kills the login's synergyc process # so that the user's script can restart it /usr/bin/killall synergyc sleep 1 -------------------------------------------------------------------------------- in /etc/X11/xdm/Xsession add the lines code:-------------------------------------------------------------------------------- # Runs synergyc as the user /usr/bin/killall synergyc sleep 1 /usr/bin/synergyc [your synergy host] Thanks anyway! |
thanks. that was very helpful
|
I forgot a key point - it may be helpful to insert those lines at the top of the script since it may not be executed if simply place at the end.
Original post link: http://www.linuxquestions.org/questi...244#post859244 |
All times are GMT -5. The time now is 07:16 PM. |