kill scripts under Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers kill scripts under Solaris
# 1  
Old 04-05-2002
kill scripts under Solaris

I should know this, but do K scripts in the /etc/rc?.d directories get run in numerically ascending or descending order? By default there are none in rc3.d. Is it OK to put 2 in there, and will they be run first (which is my goal).
Thanks,
Chuck

Last edited by 98_1LE; 04-05-2002 at 01:12 PM..
# 2  
Old 04-05-2002
kill going down, start going up

98_LE

I think that this is fairly universal for all UNIX types. Typically, Knnn scripts only run on the way down.

I have HPUX and use runlevel 4 ( /sbin/rc4.d) to test) with I will put a Snnn script in /sbin/rc4.d and a Knnn in /sbin/rc3.d to kill it when I go back to init 3.

If you put a Kill in rc3.d it won't run when you shutdown because you aren't going down to init 3, thats where you are currently.

So, it has to be in a directory below where you are currently, typically init 3 is the default.



Sorry to be so simple in my explanation, but some uninitiated may read and be curious about this too.

This is something that most of us don't consider, but once in a great while. Usually only at configuration or upgrade time. So I know how you feel. I forget stuff everyday that I have to go back to the source and look up again.

Last edited by Kelam_Magnus; 04-05-2002 at 05:26 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Solaris, grant user to kill another process

the task is grant user1 to kill another (for example user2) process. My steps: by root: usermod -P "Process Management" user1 login user1 user1@server (~) pfexec kill <PID> the result is: ksh: <PID>: not found or user1@server (~) pfexec pkill <PID> the result: nothing happens, still... (0 Replies)
Discussion started by: dsyberia
0 Replies

2. Solaris

Way to find source of a kill -9 in Solaris

Hello Guys, Someone or, some tool has killed the application process with signal 9 (kill -9) . How to track that in Solaris? On AIX we can use light-weight tool called ProbeVue to track it but not sure how to do it on Solaris. Appreciate your help. Kelly (3 Replies)
Discussion started by: aixusrsys
3 Replies

3. Shell Programming and Scripting

Kill an specific process ID using the KILL and GREP commands

Good afternoon I need to KILL a process in a single command sentence, for example: kill -9 `ps -aef | grep 'CAL255.4ge' | grep -v grep | awk '{print $2}'` That sentence Kills the process ID corresponding to the program CAL255.4ge. However it is possible that the same program... (6 Replies)
Discussion started by: enriquegm82
6 Replies

4. Solaris

Scripts in solaris server

hi, i want to know whether we can use both perl and unix shell in a single script in Solaris server (4 Replies)
Discussion started by: chn10db001
4 Replies

5. Shell Programming and Scripting

Write a scripts to kill idle user for 60 min. & email user list to admin in text file

Folks, I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3) List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
Discussion started by: sumit30
4 Replies

6. UNIX for Dummies Questions & Answers

Startup/Kill Scripts

Hello, I have to perform an audit of a system at work and I am looking at its /etc/rc3.d: K01tog-pegasus K74nscd S08iptables S50openemm K01yum K74ntpd S09isdn S55cups K02NetworkManager K85mdmpd S09pcmcia S55sshd K03rhnsd ... (8 Replies)
Discussion started by: mojoman
8 Replies

7. Solaris

Solaris login scripts

I've got Solaris 9. I've read that I can do a login script for each individual user with the .postlogin file, but is there not a way to set up something like that from a group-membership level? If there is, how can one trace down what group membership login scripts are being run? (0 Replies)
Discussion started by: citrowske
0 Replies

8. UNIX for Advanced & Expert Users

how to kill threads in solaris

Any idea how to kill threads (not processes) in solaris? I had checked the man pages for both kill and pkill to no avail. (9 Replies)
Discussion started by: izy100
9 Replies

9. UNIX for Advanced & Expert Users

kill scripts which are started using nohup

i have scipt which is calling some other scripts and some built-in utilities like SED, find etc.. i started this script using nohup (e.g: nohup scriptname &) now i want to kill this script and all the child processes of this script. the problem is, process id of child processes are... (4 Replies)
Discussion started by: gfhgfnhhn
4 Replies

10. UNIX for Advanced & Expert Users

rc scripts, do i need to kill them on shutdown?

We have a bunch of tools, that run on linux and on unix, I've got start up scripts that bring up their license managers when the unix box boots, do I need kill scripts for when the box is shutting down? I've not seen much documentation on this, just on getting the license managers started, but... (1 Reply)
Discussion started by: kymberm
1 Replies
Login or Register to Ask a Question