LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2005, 09:02 PM   #1
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Rep: Reputation: 30
Services at boot


What file can I look at to see what services are started at boot? Where can I find this file?
 
Old 03-16-2005, 09:32 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by Echo Kilo
What file can I look at to see what services are started at boot? Where can I find this file?
if you are using a redhat-based distro, try this command:

Code:
chkconfig --list
http://www.redhat.com/docs/manuals/l...chkconfig.html

http://www.rt.com/man/chkconfig.8.html

just my two cents...

Last edited by win32sux; 03-16-2005 at 09:33 PM.
 
Old 03-17-2005, 12:58 AM   #3
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Original Poster
Rep: Reputation: 30
I should have been more specific. I'm using a slackware based distro called vector linux so that command does not work.
 
Old 03-17-2005, 03:01 AM   #4
pingla
LQ Newbie
 
Registered: Mar 2005
Location: Tokyo
Distribution: Deb whore
Posts: 6

Rep: Reputation: 0
Hey

First check /etc/inittab to see which init you run. You should have a line that looks something like:

id:x:initdefault:

Where x is your runlevel.
Now within the directory structure:

/etc/rcx.d/

Where again x is your runlevel you found in inittab

Inside are symbolic links to all services you run at startup.
Simply delete all links you do not want to run at startup. If you want to add services then have a look in

/etc/init.d/

and create symlinks from the service within this directory to /etc/rcx.d

For example:

ln -s /etc/init.d/ssh /etc/rc2.d/S80ssh

where S is for starting the service and 80 is at what time.

Pingla
 
Old 03-17-2005, 08:38 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by Echo Kilo
I should have been more specific. I'm using a slackware based distro called vector linux so that command does not work.
sorry 'bout that... since you hadn't specified i figured you were using what was on your profile (mandrake)...

the startup scripts for slackware are in the /etc/rc.d directory... take a look in there, you'll find the scripts for each runlevel, as well as the individual scripts for the programs...

if for some reason you need compatibility with System V scripts, slackware provides it, but slackware's nature is to use a BSD-style init system... for the system v compatibility take a look at /etc/rc.d/rc.sysvinit.. i will quote from the file:

Quote:
# rc.sysvinit This file provides basic compatibility with SystemV style
# startup scripts. The SystemV style init system places
# start/stop scripts for each runlevel into directories such as
# /etc/rc.d/rc3.d/ (for runlevel 3) instead of starting them
# from /etc/rc.d/rc.M. This makes for a lot more init scripts,
# and a more complicated execution path to follow through if
# something goes wrong. For this reason, Slackware has always
# used the traditional BSD style init script layout.
#
# However, many binary packages exist that install SystemV
# init scripts. With rc.sysvinit in place, most well-written
# startup scripts will work. This is primarily intended to
# support commercial software, though, and probably shouldn't
# be considered bug free.

Quote:
Originally posted by pingla
Now within the directory structure:

/etc/rcx.d/

Where again x is your runlevel you found in inittab

Inside are symbolic links to all services you run at startup.
Simply delete all links you do not want to run at startup. If you want to add services then have a look in

/etc/init.d/

and create symlinks from the service within this directory to /etc/rcx.d

For example:

ln -s /etc/init.d/ssh /etc/rc2.d/S80ssh

where S is for starting the service and 80 is at what time.
like i said, slackware doesn't use system v scripts by nature, it uses the bsd-style... so there isn't a "directory structure" for the scripts... ;-)


Last edited by win32sux; 03-17-2005 at 09:37 AM.
 
Old 03-17-2005, 09:06 AM   #6
pingla
LQ Newbie
 
Registered: Mar 2005
Location: Tokyo
Distribution: Deb whore
Posts: 6

Rep: Reputation: 0
Oh, sorry.
Been years since I was a slacker.....
 
Old 03-17-2005, 01:26 PM   #7
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Original Poster
Rep: Reputation: 30
I'm begining to understand. So here is the rc4.d directory:

vector://etc/rc.d/rc4.d
root:# ls -la
total 6
drwxr-xr-x 2 root root 240 2005-03-12 23:29 ./
drwxr-xr-x 13 root root 1464 2005-03-13 20:03 ../
lrwxrwxrwx 1 root root 15 2005-03-12 23:29 K49inetd -> ../init.d/inetd*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 K59cron -> ../init.d/cron*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 K60cups -> ../init.d/cups*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 K66lisa -> ../init.d/lisa*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 S33lisa -> ../init.d/lisa*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 S39cups -> ../init.d/cups*
lrwxrwxrwx 1 root root 14 2005-03-12 23:29 S40cron -> ../init.d/cron*
lrwxrwxrwx 1 root root 15 2005-03-12 23:29 S50inetd -> ../init.d/inetd*
vector://etc/rc.d/rc4.d


Notice Samba is not there, but I know its running so do one of the processes above posibley start samba? The lisa demon seems to call the functions scripts so I put the lisa text below:

#!/bin/sh
# description: Secure Shell daemon
#
# (c) 2004, Eko M. Budi, for Vector Linux
# Released under GNU GPL
#
# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

# path to binary
ROOT="/usr/sbin"
# name of binary to run
APP="sshd"
#runtime options
OPT=""
#server name & description
SERVER="Secure Shell daemon"

check_config() {
# Create host keys if needed.
if [ ! -r /etc/ssh/ssh_host_key ]; then
/usr/bin/ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ''
fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
/usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
fi
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
fi
}

case "$1" in
start)
check_config
echon "Starting $SERVER ..."
loadproc $ROOT/$APP
;;
stop)
echon "Stopping $SERVER ..."
killproc $ROOT/$APP
;;
reload)
echon "Reloading $SERVER..........."
reloadproc $ROOT/$APP
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc $ROOT/$APP
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
;;
esac

# End /etc/init.d/


Then the functions has a script which seems to call functions-service* which has the line:

samba|smbd|nmbd)

Does that start it?
 
Old 03-17-2005, 01:33 PM   #8
Echo Kilo
Member
 
Registered: Jul 2004
Distribution: Ubuntu - Debian Based
Posts: 242

Original Poster
Rep: Reputation: 30
How do you guys "box" the code in your posts?
 
Old 03-17-2005, 01:47 PM   #9
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
it looks like the vector distro went for the System V init scripts instead of sticking with Slackware's BSD-ish ones...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting different services at boot mjjzf Slackware 2 05-21-2005 02:46 PM
Services run at boot-up vincebs Ubuntu 3 05-09-2005 11:00 AM
Autostarting services on boot explorer Fedora 3 01-30-2005 04:10 AM
Starting services at boot bionikxtc Solaris / OpenSolaris 1 03-12-2004 10:27 PM
How to stop services at boot? G-fahmah Slackware 2 02-24-2004 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration