Computing.Net > Forums > Solaris > Startup script

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

Reply to Message Icon

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



Sponsored Link
Ads by Google

Response Number 1
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.


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Sendmail problems filename prob:converts to...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Startup script

su command does not work on startup www.computing.net/answers/solaris/su-command-does-not-work-on-startup/3027.html

CDE in sunfire v120 www.computing.net/answers/solaris/cde-in-sunfire-v120/3810.html

Solaris Internet connection www.computing.net/answers/solaris/solaris-internet-connection/2852.html