make a script restarts when the system is re-started.

i would like to make a script restarts when the system is re-started under opensuse 11.0

i alredy created a file /home/pipe .bash
i also done this
chmod +x /home/pipe.bash

here is the script

#!/bin/bash
if  -e /tmp/mysql.pipe ]; then
     while  -e /tmp/mysql.pipe ]
     do
         mysql -u root --password= syslog< /tmp/mysql.pipe
     done
else
     mkfifo /tmp/mysql.pipe
fi

i 've been told to change a file named bash_ somthing (i forgot the name) to add the directory /home/pipe.bash instate of adding the script to the bash file

but i can’t locate this file

need help here

est ce que quelqu’un peu me dire ou le trouver

i changed the file place

it is now

/home/sami/pipe.bash

were i found

.bashrc et .profile

i wander wich one i have to edit and how

thks

If you want a script to start on bootup, you should really put it someplace other than a home directory. most times they are in /etc/init.d and are set up as init scripts. Google “Suse Init scripts” to get more information.

Alternately, if you don’t need that functionality, you can put it in someplace like /usr/local/ and then call it from boot.local, which should start before any init level is reached. However if it relies on other applications’ functionality, the init script is the only one that will really work, and SUSE scripts can have dependencies.

i tried o get rid of the #!/bin/bash
and coppy the rest in
/etc/profile

it worked but there is somthing stange

when i try to access to the virtual machine the script is bloqued at
here what i see

linux-ux35:~# ssh 192.168.1.69
Password:
Last login: Sun Apr  5 03:48:21 2009 from linux-ux35.lan
Have a lot of fun...

blocked

i have to tape

ctr + c
to have
linux-test1:~#

when i tried to execute the script same thing blocked as if it was waiting for some thing
it was this instruction that caused that
**
mysql -u root --password= syslog< /tmp/mysql.pipe**

so what is wrong with it

i dont know
i am lost
idid not sleep yesterday to resolve it bat
rotfl! nothing