Running a script in runlevel 1

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Running a script in runlevel 1
# 1  
Old 02-24-2010
Running a script in runlevel 1

hi all
i have to run a script in run level 1 automatically i.e when i give init 1 from runlevel 3 that script should run after entering into runlevel 1.
where can i put that script so that it will run as i said above..???

something similar to rc.local but this will run in runlevel 3( correct if i'm worng)..
any script like rc.local for runlevel 1....?
# 2  
Old 02-25-2010
/etc/init.d with a link in rc1.d
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why script is running sometimes and not running sometimes?

Hi, I have a script which does couple of database connection and run some SELECT queries to get some output in the file. I am surprised to see :eek: that when i run my script some times it gives the desired out put and sometimes it shows some error :confused: . Suppose if i execute it say... (3 Replies)
Discussion started by: Sharma331
3 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. Programming

Problem in determining runlevel through a C program

Hi, I am trying with the following code to retrieve the runlevel of my Linux Ubuntu 8.04 system by reading the "utmp" database. But I am getting blank output. May I know what correction I should do inorder to make this program to work? #include <stdio.h> #include <stdlib.h> #include... (1 Reply)
Discussion started by: royalibrahim
1 Replies

4. Solaris

runlevel issue

hi all i am using solaris 10 with run level 3.(Graphical Interface). I am a beginner to solaris so that i just want to do some R&D with my machine. I decided to boot into the command line interface, so i go througth the internet and find that the following command should be given to boot into the... (8 Replies)
Discussion started by: kingston
8 Replies

5. SuSE

New runlevel service

Ok, I am attempting to add a new program to startup during the runlevel 3. I am using Suse 10. I made a script lets call it foostart and placed it in /etc/init.d. It has 777 permissions on the script. I then created a link ln -s /etc/init.d/foostart /etc/init.d/rc3.d/S99foostart But during... (9 Replies)
Discussion started by: benefactr
9 Replies

6. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies

7. UNIX for Advanced & Expert Users

Multiple runlevel options at Bootup

Is it possible to give multiple runlevel options during boot up.. When the Welcome screen appears, i want to give multiple runlevel options.. So the user can boot into any desired runlevel he wants.. Found this kinda interesting.. Any hints and solutions please? (2 Replies)
Discussion started by: srikumar_cs
2 Replies

8. Linux

Runlevel(s)

Can some exsplain to to me what runlevel 1-9 do? I need to know. (5 Replies)
Discussion started by: Irish Jimmy
5 Replies

9. Linux

runlevel from cmdline or lilo?

Hi, Is it possible to specify runlevel from bootloader command line? I would like to override settings from /etc/inittab without changing it. Thanks (2 Replies)
Discussion started by: odys
2 Replies

10. UNIX for Dummies Questions & Answers

Runlevel in Freebsd?

Hello, Is there any runlevels in freebsd? Like in linux or solaris? Thanks -I (2 Replies)
Discussion started by: Insomniac
2 Replies
Login or Register to Ask a Question