Sponsored Content
Operating Systems Linux Script under rc3.d Vs rc.local Post 302334053 by sixstrings on Tuesday 14th of July 2009 03:40:29 PM
Old 07-14-2009
rc.local is the last thing run after the run level is reached. That is why under the rc.d directories it is listed with the 99. It is the last to run.

If you create a script to run under the rc.d/ directories, you have to assign it a number and it will run in order.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh in rc3.d startup script

Hi there , Can someone tell me whether ksh is available in rc3.d,ie will it work if i add an korn shell script in rc3.d when the system starts up ? (1 Reply)
Discussion started by: JayNick
1 Replies

2. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

3. Linux

Script under rc3.d not being executed on server bootup

Hello all, I have a script callled 'ABCstartup' setup under /etc/rc.d/init.d Softlink 'S91ABCstartup' pointing to above script has been created under /etc/rc.d/rc3.d The script is not being executed when the server restarts. The script runs successfully via manual execution:... (5 Replies)
Discussion started by: hemangjani
5 Replies

4. Shell Programming and Scripting

Perl script 'system' linking to local shell script not working

Trying to figure out why this works: printpwd.pl #!/usr/bin/perl use CGI::Carp qw( fatalsToBrowser ); print "Content-type: text/html\n\n"; $A = system("pwd"); $A = `pwd`; print "$A\n"; ^^actually that works/breaks if that makes any sense.. i get the working directory twice but when... (5 Replies)
Discussion started by: phpfreak
5 Replies

5. UNIX for Dummies Questions & Answers

Global - Local script??

Hi, I have a script which can be called from any path on the machine. It kind of acts like a global script. How do I achive this? :confused: The path from which I call it is different from the path where it exists. (where <script name> ) Thanks and Regards, Preetham R. (1 Reply)
Discussion started by: preethgideon
1 Replies

6. Shell Programming and Scripting

Execute a local script against a remote server

I am unable to run the below script against a remote server due to syntax error (then unexpected), but i am able to run it locally. Am i executing it correctly or is there any other way to execute it. ssh username@servernname ksh -s < scriptname #!/bin/ksh function record { ((end =... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies

7. Shell Programming and Scripting

To run a local shell script in a remote machine by passing arguments to the local shell script

I need to run a local shell script on a remote machine. I am able to achieve that by executing the command > ssh -qtt user@host < test.sh However, when I try to pass arguments to test.sh it fails. Any pointers would be appreciated. (7 Replies)
Discussion started by: Sree10
7 Replies

8. Shell Programming and Scripting

Running Local Script from SSH with SUDO

Hello, I know for SSH'ing and running a local script is... ssh -t user@servername < /path/to/localscript.sh and with SSH'ing and SUDO'ing is... ssh -t user@servername "sudo -u username ls -l /home/username" My inquiry is how can I combine both, by SSH'ing and SUDO'ing but running... (4 Replies)
Discussion started by: WPGPoseidon
4 Replies

9. Shell Programming and Scripting

Except script to run a local shell script on remote server using root access

local script: cat > first.sh cd /tmp echo $PWD echo `whoami` cd /tmp/123 tar -cvf 789.tar 456 sleep 10 except script: cat > first #!/usr/bin/expect set ip 10.5.15.20 set user "xyz123" set password "123456" set script first.sh spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies
it(8)							      System Manager's Manual							     it(8)

NAME
it - configure a system after installation SYNOPSIS
/sbin/it DESCRIPTION
The it program executes scripts before transferring control of the system to the user, typically before the first user logs in. The it program executes programs that collect information such as system name, passwords, timezone, and current date. A system can be in a run level at any given time; each run level has a specific group of processes that run at that level. The init program operates in one of four run levels: 0, s, 2, or 3. The run level changes when init is invoked by a privileged user. The it program is run from /etc/inittab whenever the system is booted or rebooted, or when a level transition occurs for some other reason, such as within init3. The it program first determines which run level the system is coming up under. Next it turns on shared libraries and swap and then searches for any /sbin/it.d/run-level directories, where run-level names a system run level; for example, 2.d, 3.d, 23.d, and so forth. If any such directories exist, it collects the names of all files in those directories. These files are typically links to files in the /sbin/it.d/bin directory and are created beforehand by itruns(8). After collecting the file names, it sorts them, eliminates duplicate references, orders the names as specified by the data file /sbin/it.d/data/options.mask, executes the files, and finally removes the files it executed. After all the files collected from the run level directories have been handled, it exits. The /sbin/it.d/data/options.mask file contains a single line with a list of file names separated by colons. The it command executes col- lected files in the order in which they appear from left to right in the options.mask file. Programs not listed in the options.mask file are executed after those defined in options.mask. These "unspecified" programs are run in the order into which they were initially sorted; that order is controlled by the LC_COLLATE environmental variable and the specifications in the /usr/lib/nls/loc/locale files. FILES
Specifies execution priorities of files to be run by it Files to be linked by itruns(8) for execution by it SEE ALSO
Commands: init(8), itruns(8), rc0(8), rc2(8), rc3(8), who(1) it(8)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy