Sponsored Content
Top Forums UNIX for Advanced & Expert Users program that boots at OS startup Post 28292 by Kelam_Magnus on Monday 16th of September 2002 05:30:35 PM
Old 09-16-2002
Your file locations may vary but should be similar

Sure you can. It would help to know what OS you are running.

You will need to do a few things. All these things are based on an HPUX system. But should be similar to yours

You will need to edit the /etc/inittab file to add it to the bootup.

Create a script and put it in a directory similar to /sbin/init.d, may be diff place on your box.

Create a link to the startup directory similary to /sbin/rc3.d linked to the script in /sbin/init.d. The link name will start with an "S" and a number and the script name. Like S342myscript.

You will also need a Kill script in a lower directory probably in /etc/rc1.d. This script may be called K342myscript.


So you will have 3 files basically.

/sbin/init.d/myscript # actual script here
/etc/rc3.d/S342myscript # link to above script for startup on bootup.
/etc/rc1.d/K342myscript # link to above script for kill script on shutdown.

You can look at the syntax of other scripts in this file to include the "start" and "stop" functionality with your script so you can stop it and restart it when it gets out of whack.

Look at the /sbin/init.d/cron script. This is a fairly short example of a good script to copy. There should also be a template file in there as well.

Here are a few posts that give some help.

https://www.unix.com/showthread.php?s...hlight=inittab
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

auto startup of a program

how do i make a program run at system startup? is there a hirarchy i have to consider? is there any equivalent to an NT "Service" in unix? how do you set it up? thanx Ron (2 Replies)
Discussion started by: exoron
2 Replies

2. Solaris

NIS Boots Me Out

I have a NIS environment using all Solaris 9 systems. After all kinds of trobleshooting i am to the point where I can login to a NIS account from a client system. However, the logon process starts and the splash screen is displayed and then the desk top is displayed but then it flashes and kicks... (1 Reply)
Discussion started by: meyersp
1 Replies

3. Shell Programming and Scripting

How can I make a program start up automatically after the computer restart/startup?

hi all How can I make a program start up automatically after the computer restart/startup in fedora? something like: ... Establish a shell then run some of command code. Thanks for Help!! (1 Reply)
Discussion started by: munna_dude
1 Replies

4. Red Hat

Fedora on Laptop No Longer Boots

Hi, I'm a bit of a newbie, so please bare with me. I installed Fedora 10 on a Dell Latitude D610 a few weeks ago. The computer previously had Windows on it, but I wiped it clean. I've been trying out Fedora successfully for the past couple of weeks and I was able to use the computer as recently... (1 Reply)
Discussion started by: iansocool
1 Replies

5. OS X (Apple)

How to execute a command when system boots?

Hi all, I want to execute a command when system boots. I tried to edit /etc/rc.common and add my command at the end of rc.common, but it does not work! Anyone knows how to do it? Thanks :) (6 Replies)
Discussion started by: andrewust
6 Replies

6. Ubuntu

execute command when Ubuntu boots up ?

hey all,, I want to add comments when Ubuntu starts up.. now I know that there is a directory called /etc/init.d which I can place my scripts there to run them at Ubuntu's startup.. but I prefer if there would be a file which runs when Ubuntu starts!! because it is only one command. not... (2 Replies)
Discussion started by: eawedat
2 Replies

7. Shell Programming and Scripting

Launch a text program inside a konsole at startup

Hi ULFers, I am trying to setup a (very) simple startup script on a centos 6.4 computer and it kind of failed.... Here are the details : As said just above the computer setup is running a CentOS 6.4 x64, on this computer a vncserver is automatically started (by a chkconfig vncserver on), i... (1 Reply)
Discussion started by: pierpier
1 Replies

8. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

9. HP-UX

HP-UX server boots to black graphical screen

hello all, please can you help me crack this.... i have an hp-ux server which when after booting it does not completely boot to graphical. it stops aa black screen with only an hour glass showing. at this stage only the mouse responds but the keyboard does not respond. any idea to find... (5 Replies)
Discussion started by: steveGH
5 Replies
slim(1) 																   slim(1)

" Text automatically generated by txt2man-1.4.7

NAME
slim - Simple LogIn Manager SYNOPSIS
slim [options] [<arguments>] DESCRIPTION
SLiM is a lightweight login manager for X11, allowing the initialization of a graphical session by entring username and password in a login screen. OPTIONS
-d run as a daemon -p /path/to/theme display a preview of the theme. An already running X11 session is required for theme preview. -h display a brief help message -v display version information EXAMPLES
slim -d run slim in daemon mode slim -p /usr/share/slim/themes/default preview of the default theme STARTING SLIM AT BOOT
Please refer to documentation of your Operating System to make slim automatically startup after the system boots. CONFIGURATION
Global configuration is stored in the /etc/slim.conf file. See the comments inside the file for a detailed explanation of the options. USAGE AND SPECIAL USERNAMES
When started, slim will show a login panel; enter the username and password of the user you want to login as. Special usernames: console open a xterm console exit quit slim halt shutdown the machine reboot reboot the machine suspend power-suspend the machine See the configuration file for customizing the above commands. The 'halt' and 'reboot' commands need the root password, this may change in future releases. Shortcuts: F11 executes a custom command (by default takes a screenshot) F1 choose session type (see configuration file and xinitrc.sample) AUTHORS
Simone Rota <sip@varlock.com> Johannes Winkelmann <jw@tks6.net> SEE ALSO
See the online documentation at the SLiM web site for further information on themes, FAQs, etc. January 09, 2006 slim(1)
All times are GMT -4. The time now is 11:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy