Solved

preventing service from auto-start...

Posted on 2001-07-14
11
401 Views
Last Modified: 2011-10-03
Hi,

I've installed a product which, after configuration, sets autostart for it's main service. So everytime I reboot my Unix box, the service starts up automatically and starts all the processes which run the product. I would like to know a method with which I could suppress this autostart functionality so that the service could only be started in a manual way. Can any one please tell me how this could be done on Unix? I am using Compaq Tru64 UNIX v5.1.

Thanks in advance.
0
Comment
Question by:baigmz
11 Comments
 

Author Comment

by:baigmz
Comment Utility
Oh btw, the product doesn't provide a feature which could be used to enable/disable autostart. I would like to use a standard Unix method to change the startup flag.
0
 
LVL 3

Expert Comment

by:tdaoud
Comment Utility

You might wanna check the path /etc/rc.d/init.d if your service batch file is there.  If it is there you will need to move it away from that directory since that were all services auto-start on booting.

I'm not sure regarding Tru64 Unix but it may be the same above mentioned path or something close to it.

Good Luck

Tarik
0
 

Author Comment

by:baigmz
Comment Utility
Thanks, but I couldn't find that file on Tru64 UNIX.
0
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
Hi baigmz ,

    You might end up have to write your own start up script for this. and
put it in /etc/rc2.d or /etc/rc3.d and give it a name like S99mgstartup
     
    Here's a example startup-stop script:
                        #=============================================
 #!/bin/sh
  #
  # Generic script used to start and stop a service

      case "$1" in

               'start')
                        # Start the sshd server
                        if [ -f /usr/local/sbin/sshd ]; then
                               /usr/local/sbin/sshd &
                        fi
                        ;;
                'stop')
                    pid=`ps -ef | grep sshd | grep -v grep | awk '{print $2} ' `        
                    if test "$pid" ;  then
                        /usr/bin/kill $pid
                    else
                        echo "No PID file. Process may not be running"
                    fi
                   ;;
                   *)
                      echo "Usage: /etc/init.d/sshd { start | stop }"
                        ;;
                esac
              exit 0
                        #======================================================

      I hope this infor can help. for soem of the software, you have to write
your own startup script.


     Cheers!

yuzh
0
 

Accepted Solution

by:
PaulSmirnoff earned 60 total points
Comment Utility
Depending on what runlevel you r using it will be probably:

1) some script in   /etc/rc{RUNLEVEL}.d   ...

2) some entry in /dev/inittab

3) /dev/rc.local

Check it out
Paul..
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Expert Comment

by:PaulSmirnoff
Comment Utility
OOps, sorry..


/sbin/rc2.d


0
 

Author Comment

by:baigmz
Comment Utility
Thanks for your suggestions...I'll give them a try and let you know soon.
0
 
LVL 3

Expert Comment

by:mrn060900
Comment Utility
on Tru64 they stick all the start-up stuff in /sbin, so checkout

init.d
rc1.d
rc2.d
rc3.d

more than likely your looking for something like

S99programname

Regards Mike
0
 
LVL 1

Expert Comment

by:Ernest022699
Comment Utility
When you've found the entry in rc3.d (for example) and have commented it out (DON'T REMOVE IT ENTIRELY!), then you can copy the entry and change the init level to a, b, etc.  The letter init levels are intended for exactly the purpose you intend.

Do not accept this comment as the answer.  Other people have contributed more.
0
 

Author Comment

by:baigmz
Comment Utility
Thanks, script worked.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.11501898.html
http://www.experts-exchange.com/questions/Q.20004188.html
http://www.experts-exchange.com/questions/Q.20106152.html
http://www.experts-exchange.com/questions/Q.11359277.html
http://www.experts-exchange.com/questions/Q.20150126.html
http://www.experts-exchange.com/questions/Q.20150740.html
http://www.experts-exchange.com/questions/Q.20151616.html
http://www.experts-exchange.com/questions/Q.20161911.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20155689.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now