Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Startup script
Name: Aneela90 Date: January 9, 2003 at 03:53:25 Pacific OS: solaris 8 CPU/Ram: 128
Comment:
I have scrit I want to run it at system startup how I do it.or when system restartup
Name: cdac Date: January 9, 2003 at 07:38:56 Pacific
Reply:
Instead of echo you can put what the script is expected to do.
#!/sbin/sh #
case "$1" in 'start') echo " Start is passed" ;; 'stop') echo " Stop is passed" ;; *) echo "Usage: $0 { start|stop }" exit 1 ;; esac exit 0
0
Response Number 2
Name: Fifield Date: January 9, 2003 at 12:11:54 Pacific
Reply:
If you cd to /etc/rc2.d you will see a number of start-up scripts. Just pattern one after the last posting submission, or create your own patterned after one of these. Make sure it is executable.
0
Response Number 3
Name: jmiturbe Date: January 10, 2003 at 03:10:34 Pacific
Reply:
Hello,
You must know that every script at /etc/rcX.s that begins with "S" is executed at startup as with the start argument passed. And if it begins with K as if you execute with the stop argument. The number following these letters indicate the execution order.
So in your situation, make sure that the script begins with "SXX" where XX is a number.
Bye,
jmiturbe
0
Response Number 4
Name: Ayaz Ali Date: January 10, 2003 at 04:15:46 Pacific
Reply:
for example I want to run squid at starup of computer or sendmail or any other daemon how i dot it.
0
Response Number 5
Name: David Perry Date: January 10, 2003 at 05:20:05 Pacific
Reply:
For sendmail, look at the file
/etc/rc2.d/S88sendmail
Other daemon startup scripts should follow this style.
Summary: Hi, I tried to the following startup script that launches another script using the su command. It seems like the startup script is being executed but the script that is being called in the su command ...
Summary: Are you saying if you start an x windows client and tell it to connect to this host it does not? The startup script /etc/rc2.d/S99dtlogin starts your xwindows server. Try: /usr/openwin/bin/xterm ...
Summary: To activate the system as dhcp-client create the empty file: /etc/dhcp.YOUR_INTERFACE_NAME To configure dns-setting create the file /etc/resolv.conf with the following entry: nameserver IP_OF_NAME...