Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To start login/programms on boot up Post 24664 by Kelam_Magnus on Tuesday 16th of July 2002 11:01:54 AM
Old 07-16-2002
This can be very OS dependent. On my HPUX system, you would put a script in /sbin/init.d.

To start up a script at boot time, create a link in the run level directory that you want it to start up at. In my case that is runlevel 3. I would put a link in /sbin/rc3.d linked to the file in /sbin/init.d with an Sxxxfilename. Where xxx is a 3 digit number. and a Kxxxfilename in a lower level run level directory to kill the script as the box shuts down.

Here is an example:

cd /sbin/init.d
touch startup.sh # you would have a real script here.
cd /sbin/rc3.d
ln S723startup.sh /sbin/init.d/starup.sh

cd /sbin/rc2.d
ln K723startup.sh /sbin/init.d/startup.sh


You will need to look at another script in /sbin/init.d to see how to use the stop and start functionality for this to work. This should be a fairly common standard for most UNIX OSs. The directories may be different but the concept is vaild.






Smilie Smilie Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

start a process at boot up time

Hi, I have a program that check the IP address and automatic update it to the DNS server. I would like to run this program when the computer bootup after pppd get a connection. How do I add it to the init file. Does any one have any information of how to do it. I run a Linux Mandrake as a... (1 Reply)
Discussion started by: vtran4270
1 Replies

2. Solaris

nfsd won't start at boot up

Hi Inexplicably, nfsd no longer starts automatically on our Sun boxes running Solaris 9, so that 'automount' no longer functions automatically. The problem first manifested itself when we could not access files on any of the nfs automounted directories in our LAN after one of the servers (say... (19 Replies)
Discussion started by: dcshungu
19 Replies

3. SuSE

Start Asterisk at boot?

Hello, I am running a SuSe 9.3 server. That have Asterisk. Asterisk are working fine/perfect. But what I want to do is to make it start up at boot. When I have started the computer can I type: sudo /root/Asterisk-1.0.8/Asterisk And it goes of. No problem. But I want it to do that by itself... (4 Replies)
Discussion started by: hast5
4 Replies

4. Solaris

Using LOM port to start boot solaris 10

Hi. Hopefully a question with a very short answer. Previously I have been using a windows hyperterminal to boot solaris 10 systems (SunFire) over a serial lom cable. I want to perform the same operation from a solaris 8 machine to boot solaris 10. Can anyone tell me what commands I should... (2 Replies)
Discussion started by: RottingBadger
2 Replies

5. SuSE

How to start Apache2 and vsftpd at boot

My apache and ftp server is working fine but when I reboot the system ftp and web server is not running automatically. Please advise on how to start apache and ftp at boot. (9 Replies)
Discussion started by: real-chess
9 Replies

6. HP-UX

HP UX start process at boot time

When I get start program at boot I read which run level /sbin/rcx.d runlevel=0.....x only read directory which directory name has UpperCase 'S' is not enough someone says that I need to reference another file which file I need to reference 1)/etc/rc.config.d/all file which parameter... (4 Replies)
Discussion started by: alert0919
4 Replies

7. Red Hat

NFS does not start during boot process

Hello, I am facing some issues during boot process of rhel 6.2 It takes too long time (~10 min) for the node to come up... The boot process stuck while it trying to start NFS and does not continue until timeout. In the boot.log file i see Starting NFS quotas: Cannot register service:... (2 Replies)
Discussion started by: @dagio
2 Replies

8. UNIX for Dummies Questions & Answers

Webmin dont want to start at boot

Hello, after webmin install, it was running, but after reboot, i need webmin to start automatically. I need this to be done without editting anything in webmin mysql (setting it from webmin admin area). So i tried chkconfig webmin on and added startup script to rc.local but still dont works..... (1 Reply)
Discussion started by: postcd
1 Replies

9. Red Hat

iptables does not start on boot

Hello, I have an issue with iptables. The rules are already configured in /etc/sysconfig/iptables but when i reboot the node the service is not running or at least i can't see my rules. Below the configuration i did to start the service during boot. # chkconfig --list iptables iptables... (1 Reply)
Discussion started by: @dagio
1 Replies

10. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies
listusers(1)							   User Commands						      listusers(1)

NAME
listusers - list user login information SYNOPSIS
listusers [-g groups] [-l logins] DESCRIPTION
Executed without any options, this command lists all user logins sorted by login. The output shows the login ID and the account field value from the system's password database as specified by /etc/nsswitch.conf. OPTIONS
The following options are supported: -g groups Lists all user logins belonging to group, sorted by login. Multiple groups can be specified as a comma-separated list. -l logins Lists the user login or logins specified by logins, sorted by login. Multiple logins can be specified as a comma-separated list. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------------------------------------+ |ATTRIBUTE TYPE ATTRIBUTE VALUE | |Availability SUNWcsu | +-----------------------------------------------------------+ SEE ALSO
nsswitch.conf(4), attributes(5) NOTES
A user login is one that has a UID of 100 or greater. The -l and -g options can be combined. User logins will only be listed once, even if they belong to more than one of the selected groups. SunOS 5.11 18 Mar 1994 listusers(1)
All times are GMT -4. The time now is 10:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy