This is a discussion on start up and stop the running script within the Shell scripting forums, part of the Development/Scripting category; i create my script inside /etc/rc.d/rc3.d/filename i named my filename=S99zz this script that will continues running... i believed its not ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
i create my script inside /etc/rc.d/rc3.d/filename
i named my filename=S99zz this script that will continues running... i believed its not ok to enter ctrl+c... how is it? do i have to enter some lines at rc6.d...(since rc6.d is responsible for shutting down) |
| Sponsored Links | ||
|
|
|
|||
|
from your replied post, i'm a bit confuse...
i already named my script S99zz where should i put the code cd /etc/rc3.d ln -s /etc/init.d/S99zz S99?? cd /etc/rc6.d ln -s /etc/init.d/S99zz K99?? sorry for being so miserable... |
|
|||
|
i've tried...
correct me if i'm doing wrong... i create a file in /etc/init.d the filename is test inside the test..i put #!/bin/bash cd /etc/rc3.d ln -s /etc/init.d/test S99test cd /etc/rc6.d ln -s /etc/init.d/test K99test i've looking what is happening to the system... and discover that S99test is created inside /etc/rc3.d also, K99test is created inside /etc/rc6.d the thing is... where should i put my real script? still in puzzled... please help me... |
|
||||
|
Quote:
Step # 1: Create a script called test Code:
cd /etc/init.d Code:
vi test Code:
cd /etc/rc2.d ln -s ../init.d/test S99test [code]cd /etc/rc6.d ln -s ../init.d/test K99test[code] For example here is how my oracle startup script looks http://bash.cyberciti.biz/script/ora...service.sh.php Now I need to copy this script to /etc/init.d/ directory. Next, softlink pracle using ln command [code]cd /etc/rc2.d ln -s ../init.d/oracle S99oracle[/code] |
|
|||
|
thanks nixcraft...
u really help me alot... my script appear before the OS (montaVista) is loading.. and my script, will copy some files in to another file and later will reboot... this will run continuosly... i cant hit ctrl+c to stop the script while it running my script.. is there any other way to stop them... thanks in advance |
|
|||
|
#!/bin/bash
echo "Start Processing" >> ~/mylog.txt true=1 while [ $true ] do echo "$date $*" >> ~/mylog.txt echo Counter >> ~/mylog1.txt count=0 echo exec 3<>mylog1.txt while read line < &3 do { echo "$line" ((count++)); } done exec 3>&- echo "Counter=$count" echo mv C:\BIOS\P12N0027.ROM C:\BIOS\DUMMY.ROM mv C:\BIOS\P13N0028.ROM C:\BIOS\P12N0027.ROM mv C:\BIOS\DUMMY.ROM C:\BIOS\P13N0028.ROM sleep 1 shutdown -r now done day by day... my script is getting better... i'll notify you if i made changes |
|
|||
|
nixcraft...
what is the meaning of SYS V style? i did put a timer at my script and did run well... but then i concern about .cfg file... i did browse around and did open my .cfg file inside my Fedora core... but i cant see the way.. can you give me example of simple .cfg file.. my sv said that if i wanted user to enter the data and saved as the varible for next execution, i need .cfg file.. please help me |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to stop hibernate mode on Laptop | mendoza | Getting started tutorials | 3 | 09-08-2007 06:01 PM |
| start and stop service in crontab. | gthian | Shell scripting | 7 | 05-31-2007 12:04 PM |
| ubuntu linux start, stop, restart networking | toor | Linux software | 3 | 07-17-2006 12:32 PM |
| required help for running a shell script from browser | vaishalichitale | Shell scripting | 1 | 06-27-2006 05:53 PM |
| running .sh script linux | jerry | Shell scripting | 1 | 06-17-2006 02:45 PM |