Sponsored Content
Operating Systems Linux SuSE Executing set of sh files at system startup Post 302117543 by vgersh99 on Tuesday 15th of May 2007 09:05:39 AM
Old 05-15-2007
duplicate post - pls read the rules
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can I add my own service when system startup?

Hi All, My OS is redhat 7.1. How can I start my own service (e.g. simple scripts) when the system is started? I found something like /etc/rc.d, /etc/rc.init ... But I have no idea on them, have anyone can help me? regards wilson (6 Replies)
Discussion started by: wilsonchan1000
6 Replies

2. UNIX for Dummies Questions & Answers

System Startup Time

Hi all, Can anyone tell me how to find the System Startup time. Currently I am using "who -b" to get last reboot time. I wanted to know is there any log file for SCO Openserver 5, in which all this sort of imformations are kept. I have tried searching the forum with words like "WHO... (6 Replies)
Discussion started by: shoeb_syed
6 Replies

3. AIX

Not executing during startup

I have a command in my iniitab as follows: dsmc:2a:once:/usr/tivoli/tsm/client/ba/bin/dsmc sched > /dev/null 2>&1 But the command doe not appear to execute during a system boot. Not sure why. I am running AIX 5.1 Thanks for the help Mike (2 Replies)
Discussion started by: mhenryj
2 Replies

4. UNIX for Advanced & Expert Users

AIX 5.3: Start Service on System startup

Hi, I'm new to AIX, and have to make some services start at system startup. The IBM-Redbook says I have to edit /etc/inittab. As a long time (Debian)-Linux Admin I'm a bit confused. Is there something like /etc/init.d/$SERVICE in AIX? Greetings, Dennis (1 Reply)
Discussion started by: dennis.kuehl
1 Replies

5. Solaris

stop a process to start at system startup

Hi all! I'm running Solaris 10 and have a question about how i can stop a certain program to start at system startup,for example, as it is now sendmail is starting but i don't need sendmail,on the other hand so would i be very glad to get cups up and running at startup, anyone who can explain where... (3 Replies)
Discussion started by: larsgk
3 Replies

6. HP-UX

Executing a script at startup

Hi, I want a script to execute as soon as a user logs in(instead of directing to his home directory). i know that i have to mention the path of script in the user's .profile to execute this, but not sure where and what to edit. I just tried and was unsuccesful. Kindly provide the code that i... (4 Replies)
Discussion started by: sridharr83
4 Replies

7. Shell Programming and Scripting

Executing a command at startup

Hey all, How do I execute a file at startup automatically. From what I've read is that I need to put it into my .bashrc file. I'm not sure where to go from there. Can I just type commands into that and they'll run next time I restart my server? Right now I have added these lines: cd... (2 Replies)
Discussion started by: NathanWarden
2 Replies

8. Solaris

Mountall error at system startup

Hi I have SVM on my Solaris 10 5/08 SPARC with the following configuration: d1: Mirror Submirror 0: d11 State: Okay Submirror 1: d12 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size:... (2 Replies)
Discussion started by: Sapfeer
2 Replies

9. Shell Programming and Scripting

how to delete files at booting of system (system startup)

hi all I have a problem how to write a shell script which delete files/folder form directory whenever system boot and copy last updated folder/file in the specified directory.pse help me ASAP. i write a script which copy files in directory.I want when system boot up using script it check whether... (1 Reply)
Discussion started by: shubhig15
1 Replies

10. Linux

Set -n doesn't stop executing

When I do "set -n" or "set -o noexec" the shell doesn't do what it sould. Infact if I check: $: set -o .... noexec off .... f ...instead I can set normally the other option. Who Knows what could be up? (2 Replies)
Discussion started by: flaviofachin
2 Replies
BOOT(7) 						     Linux Programmer's Manual							   BOOT(7)

NAME
boot-scripts - General description of boot sequence DESCRIPTION
The boot sequence varies in details among systems but can be roughly divided to the following steps: (i) hardware boot, (ii) OS loader, (iii) kernel startup, (iv) init and inittab, (v) boot scripts. We will describe each of these in more detail below. Hardware-boot After power-on or hard reset, control is given to a program stored on read-only memory (normally PROM). In PC we usually call this program the BIOS. This program normally makes a basic self-test of the machine and accesses nonvolatile memory to read further parameters. This memory in the PC is battery-backed CMOS memory, so most people refer to it as the CMOS, although outside of the PC world, it is usually called nvram (nonvolatile ram). The parameters stored in the nvram vary between systems, but as a minimum, the hardware boot program should know what is the boot device, or which devices to probe as possible boot devices. Then the hardware boot stage accesses the boot device, loads the OS Loader, which is located on a fixed position on the boot device, and transfers control to it. Note: We do not cover here booting from network. Those who want to investigate this subject may want to research: DHCP, TFTP, PXE, Ether- boot. OS Loader In PC, the OS Loader is located in the first sector of the boot device - this is the MBR (Master Boot Record). In most systems, this primary loader is very limited due to various constraints. Even on non-PC systems there are some limitations to the size and complexity of this loader, but the size limitation of the PC MBR (512 bytes including the partition table) makes it almost impos- sible to squeeze a full OS Loader into it. Therefore, most operating systems make the primary loader call a secondary OS loader which may be located on a specified disk partition. In Linux the OS loader is normally lilo(8) or grub(8). Both of them may install either as secondary loaders (where the DOS installed MBR points to them), or as a two part loader where they provide special MBR containing the bootstrap code to load the second part of the loader from the root partition. The main job of the OS Loader is to locate the kernel on the disk, load it and run it. Most OS loaders allow interactive use, to enable specification of alternative kernel (maybe a backup in case the last compiled one isn't functioning) and to pass optional parameters to the kernel. Kernel Startup When the kernel is loaded, it initializes the devices (via their drivers), starts the swapper (it is a "kernel process", called kswapd in modern Linux kernels), and mounts the root file system (/). Some of the parameters that may be passed to the kernel relate to these activities (e.g: You can override the default root file system). For further information on Linux kernel parameters read bootparam(7). Only then the kernel creates the first (user land) process which is numbered 1. This process executes the program /sbin/init, passing any parameters that weren't handled by the kernel already. init and inittab When init starts it reads /etc/inittab for further instructions. This file defines what should be run in different run-levels. This gives the system administrator an easy management scheme, where each run-level is associated with a set of services (e.g: S is single- user, on 2 most network services start, etc.). The administrator may change the current run-level via init(8) and query the current run- level via runlevel(8). However, since it is not convenient to manage individual services by editing this file, inittab only bootstraps a set of scripts that actu- ally start/stop the individual services. Boot Scripts Note: The following description applies to System V release 4 based system, which currently covers most commercial Unix systems (Solaris, HP-UX, Irix, Tru64) as well as the major Linux distributions (RedHat, Debian, Mandrake, Suse, Caldera). Some systems (Slackware Linux, FreeBSD, OpenBSD) have a somewhat different scheme of boot scripts. For each managed service (mail, nfs server, cron, etc.) there is a single startup script located in a specific directory (/etc/init.d in most versions of Linux). Each of these scripts accepts as a single argument the word "start" -- causing it to start the service, or the word "stop" -- causing it to stop the service. The script may optionally accept other "convenience" parameters (e.g: "restart", to stop and then start, "status" do display the service status). Running the script without parameters displays the possible arguments. Sequencing Directories To make specific scripts start/stop at specific run-levels and in specific order, there are sequencing directories. These are normally in /etc/rc[0-6S].d. In each of these directories there are links (usually symbolic) to the scripts in the /etc/init.d directory. A primary script (usually /etc/rc) is called from inittab(5) and calls the services scripts via the links in the sequencing directories. All links with names that begin with 'S' are being called with the argument "start" (thereby starting the service). All links with names that begin with 'K' are being called with the argument "stop" (thereby stopping the service). To define the starting or stopping order within the same run-level, the names of the links contain order-numbers. Also, to make the names clearer, they usually end with the name of the service they refer to. Example: the link /etc/rc2.d/S80sendmail starts the sendmail service on runlevel 2. This happens after /etc/rc2.d/S12syslog is run but before /etc/rc2.d/S90xfs is run. To manage the boot order and run-levels, we have to manage these links. However, on many versions of Linux, there are tools to help with this task (e.g: chkconfig(8)). Boot Configuration Usually the daemons started may optionally receive command-line options and parameters. To allow system administrators to change these parameters without editing the boot scripts themselves, configuration files are used. These are located in a specific directory (/etc/sysconfig on RedHat systems) and are used by the boot scripts. In older Unix systems, these files contained the actual command line options for the daemons, but in modern Linux systems (and also in HP- UX), these files just contain shell variables. The boot scripts in /etc/init.d source the configuration files, and then use the variable values. FILES
/etc/init.d/, /etc/rc[S0-6].d/, /etc/sysconfig/ SEE ALSO
inittab(5), bootparam(7), init(8), runlevel(8), shutdown(8) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-06-03 BOOT(7)
All times are GMT -4. The time now is 03:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy