Sponsored Content
Full Discussion: Run at boot
Top Forums Shell Programming and Scripting Run at boot Post 302491739 by citaylor on Friday 28th of January 2011 06:56:10 AM
Old 01-28-2011
I would use the example init.d scripts that come with trac
and one similar to this one for svn server
Note in the trac one the header:
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          tracd
# Required-Start:    networking
# Required-Stop:     networking
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start the tracd standalone Trac web server.
### END INIT INFO
# (C) 2008 Guy Rutenberg <http://www.guyrutenberg.com>

This is very important on SuSE distro's as its used by "insserv" to decide what to start and when. If you add one of these headers to the svn serve init.d script above and save them both to /etc/init.d and tweak their settings for your installation.

Then use "chkconfig -del" to stop the xinetd service from starting (as opposed to using the "killall xinetd" entry - I assume thats what you want)

And then use "chkconfig -add" to enable the other two new scripts, and then run "insserv" it should automatically add the two scripts in at the right levels with the right dependencies.

Use "chkconfig -list" with a grep to display the new services to check they are now enabled, and reboot.

Hopefully this should sort all your startup issues in a nice SuSE way.

I hope this helps...
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cannot boot - Boot : Panic : File size out of range (EWS-UX/V unix)

Hey ! I am running EWS-UX/V (Rel 4.2) on NEC EWS/4800/330 station and I am having problems rebooting my station : I am getting the following message on display : BOOT : PANIC : File size out of range. According to user guide, this error is occuring when a file exceeding the limit and/or... (2 Replies)
Discussion started by: fredo
2 Replies

2. Solaris

solaris boot problem boot error loading interpreter(misc/krtld)

When I installed the SOLARIS 10 OS first time, the desktop would not start up, this was because of network setup. Reinstalled worked. After a week due to some problem I had to reinstall OS, installation went fine and but when i reboot I get this error. cannot find mis/krtld boot error loading... (0 Replies)
Discussion started by: johncy_j
0 Replies

3. Debian

Grub2 (dual boot, dmraid) cannot run Debian6

Hello, firstly excuse for my poor english. I have a busybox error when I try to run Debian 6. It's like Grub cannot find root (initramfs) My system is: - RAID0 with dmraid - /boot ext2 (from moonOS installation --ubuntu based--) - ext4 (moonOS wich have the Grub2 installation, where I... (0 Replies)
Discussion started by: neutralTTY
0 Replies

4. Boot Loaders

Reboot and Select Proper Boot device or insert Boot media in select Boot device and press a key

Hello, I have kubuntu on my laptop and now I decided to switch to Windows 7. I made the bios settings properly (first choice is boot from cd\vd) but I see the error " reboot and select proper Boot device or insert Boot media in select Boot device and press a key " I have tried CD and... (0 Replies)
Discussion started by: rpf
0 Replies

5. Solaris

Solaris x86 installation using jumpstart does not local boot ( boot from hdd)

I am trying to install Solaris x86 using the Jumpstart server. I run the add_install_client command with appropriate options, and reboot my x86 Target box. The installation starts fine and unattended. After the installation completes and the target goes for a re-boot, it does not boot from the HDD... (9 Replies)
Discussion started by: hemalsid
9 Replies

6. UNIX for Dummies Questions & Answers

How to run linux in windows 7 without dual boot?

tell me in steps if its virtual box (2 Replies)
Discussion started by: mahor1989
2 Replies

7. UNIX for Advanced & Expert Users

has no rc.local in /etc, how to auto run cmd in the boot process?

Hi I want to run some cmd before the linux boot up and I want to let it run before sshd service start, any helps? (1 Reply)
Discussion started by: yanglei_fage
1 Replies

8. UNIX for Dummies Questions & Answers

Boot vs run

Hello! Please, what ELSE do we BOOT except of operating systems? Can someone list me at least some programs which we boot and are not OSs? Many thanks¨! (1 Reply)
Discussion started by: pinklemon
1 Replies

9. Solaris

Change run level at boot

for solaris 11, how does one change the run level at boot from 3 to 2? i checked "/etc/inittab" file where i usually change it in other *nix but it seems solaris is not using it. (1 Reply)
Discussion started by: badbanana
1 Replies
CHKCONFIG(8)						      System Manager's Manual						      CHKCONFIG(8)

NAME
chkconfig - updates and queries runlevel information for system services SYNOPSIS
chkconfig [--list] [--type type] [name] chkconfig --add name chkconfig --del name chkconfig --override name chkconfig [--level levels] [--type type] [--no-redirect] name <on|off|reset|resetpriorities> chkconfig [--level levels] [--type type] [--no-redirect] name DESCRIPTION
chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories. This implementation of chkconfig was inspired by the chkconfig command present in the IRIX operating system. Rather than maintaining con- figuration information outside of the /etc/rc[0-6].d hierarchy, however, this version directly manages the symlinks in /etc/rc[0-6].d. This leaves all of the configuration information regarding what services init starts in a single location. chkconfig has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service. When chkconfig is run with only a service name, it checks to see if the service is configured to be started in the current runlevel. If it is, chkconfig returns true; otherwise it returns false. The --level option may be used to have chkconfig query an alternative runlevel rather than the current one. When chkconfig is run with the --list argument, or no arguments at all, a listing is displayed of all services and their current configura- tion. If one of on, off, reset, or resetpriorities is specified after the service name, chkconfig changes the startup information for the speci- fied service. The on and off flags cause the service to be started or stopped, respectively, in the runlevels being changed. The reset flag resets the on/off state for all runlevels for the service to whatever is specified in the init script in question, while the resetpri- orities flag resets the start/stop priorities for the service to whatever is specified in the init script. By default, the on and off options affect only runlevels 2, 3, 4, and 5, while reset and resetpriorities affects all of the runlevels. The --level option may be used to specify which runlevels are affected. Note that for every service, each runlevel has either a start script or a stop script. When switching runlevels, init will not re-start an already-started service, and will not re-stop a service that is not running. chkconfig also can manage xinetd scripts via the means of xinetd.d configuration files. Note that only the on, off, and --list commands are supported for xinetd.d services. chkconfig supports a --type argument to limit actions to only a specific type of services, in the case where services of either type may share a name. Possible values for type are sysv and xinetd. OPTIONS
--level levels Specifies the run levels an operation should pertain to. It is given as a string of numbers from 0 to 6. For example, --level 35 specifies runlevels 3 and 5. --no-redirect When chkconfig is run on a system that uses systemd as its init system, chkconfig will forward commands to systemd if a systemd ser- vice file exists for it. This switch turns off the redirection to systemd and only operates on the symlinks in /etc/rc[0-6].d. This option is only valid when on, off, or no command (to check enablement) is passed to a service. --add name This option adds a new service for management by chkconfig. When a new service is added, chkconfig ensures that the service has either a start or a kill entry in every runlevel. If any runlevel is missing such an entry, chkconfig creates the appropriate entry as specified by the default values in the init script. Note that default entries in LSB-delimited 'INIT INFO' sections take prece- dence over the default runlevels in the initscript; if any Required-Start or Required-Stop entries are present, the start and stop priorities of the script will be adjusted to account for these dependencies. --del name The service is removed from chkconfig management, and any symbolic links in /etc/rc[0-6].d which pertain to it are removed. Note that future package installs for this service may run chkconfig --add, which will re-add such links. To disable a service, run chkconfig name off. --override name If service name is configured exactly as it would be if the --add option had been specified with no override file in /etc/chkcon- fig.d/name, and if /etc/chkconfig.d/name now exists and is specified differently from the base initscript, change the configuration for service name to follow the overrides instead of the base configuration. --list name This option lists all of the services which chkconfig knows about, and whether they are stopped or started in each runlevel. If name is specified, information in only display about service name. RUNLEVEL FILES
Each service which should be manageable by chkconfig needs two or more commented lines added to its init.d script. The first line tells chkconfig what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a - should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash continuation. For example, random.init has these three lines: # chkconfig: 2345 20 80 # description: Saves and restores system entropy pool for # higher quality random number generation. This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop prior- ity should be 80. You should be able to figure out what the description says; the causes the line to be continued. The extra space in front of the line is ignored. chkconfig also supports LSB-style init stanzas, and will apply them in preference to "chkconfig:" lines where available. A LSB stanza looks like: ### BEGIN INIT INFO # Provides: foo # Required-Start: bar # Defalt-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Foo init script ### END INIT INFO In this case, the start priority of "foo" would be changed such that it is higher than the "bar" start priority, if "bar" is enabled. Care must be taken when adding dependencies, as they can cause vast shifts in the start and stop priorities of many scripts. OVERRIDE FILES
File in /etc/chkconfig.d/servicename are parsed using the same comments that chkconfig notices in init service scripts, and override values in the init service scripts themselves. SEE ALSO
init(8) ntsysv(8) system-config-services(8) AUTHOR
Erik Troan <ewt@redhat.com> 4th Berkeley Distribution Wed Oct 8 1997 CHKCONFIG(8)
All times are GMT -4. The time now is 02:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy