Daemons in Fedora? [unresolved]

You like a certain distro? Tell us why here

Moderators: b1o, jkerr82508

Forum rules
Try to avoid "fanboyism" Spam is strictly forbidden. The general rules apply: viewtopic.php?f=8&t=568
User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Daemons in Fedora? [unresolved]

Postby dedanna1029 » 12 Aug 2010, 17:44

Where does Fedora get the daemons to start on bootup? The rc.conf in /etc/init don't seem to contain that.

Thanks.
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

rvause
Viking
Posts: 42
Joined: 16 Jun 2010, 20:17
Contact:

Re: Daemons in Fedora?

Postby rvause » 12 Aug 2010, 19:42

Did you check /etc/rc ?

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: Daemons in Fedora?

Postby dedanna1029 » 13 Aug 2010, 01:38

Yes.

Code: Select all

$ cat /etc/rc
#! /bin/bash
#
# rc            This file is responsible for starting/stopping
#               services when the runlevel changes.
#
# Original Author:       
#               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
#

set -m

# check a file to be a correct runlevel script
check_runlevel ()
{
   # Check if the file exists at all.
   [ -x "$1" ] || return 1
   is_ignored_file "$1" && return 1
   return 0
}

# Now find out what the current and what the previous runlevel are.
argv1="$1"
set $(/sbin/runlevel)
runlevel=$2
previous=$1
export runlevel previous

. /etc/init.d/functions

export CONSOLETYPE
do_confirm="no"
if [ -f /var/run/confirm ]; then
   do_confirm="yes"
fi
UPSTART=
[ -x /sbin/initctl ] && UPSTART=yes
# See if we want to be in user confirmation mode
if [ "$previous" = "N" ]; then
   if [ "$do_confirm" = "yes" ]; then
      echo $"Entering interactive startup"
   else
      echo $"Entering non-interactive startup"
   fi
fi

# Get first argument. Set new runlevel to this argument.
[ -n "$argv1" ] && runlevel="$argv1"

# Is there an rc directory for this new runlevel?
[ -d /etc/rc$runlevel.d ] || exit 0

# Set language, vc settings once to avoid doing it for every init script
# through functions
if [ -z "${NOLOCALE:-}" ] && [ -f /etc/sysconfig/i18n ] ; then
  . /etc/profile.d/lang.sh 2>/dev/null
  export LANGSH_SOURCED=1
fi

# First, run the KILL scripts.
for i in /etc/rc$runlevel.d/K* ; do

   # Check if the subsystem is already up.
   subsys=${i#/etc/rc$runlevel.d/K??}
   [ -f /var/lock/subsys/$subsys ] || [ -f /var/lock/subsys/$subsys.init ] || continue
   check_runlevel "$i" || continue

   # Bring the subsystem down.
   [ -n "$UPSTART" ] && initctl emit --quiet stopping JOB=$subsys
   $i stop
   [ -n "$UPSTART" ] && initctl emit --quiet stopped JOB=$subsys
done

# Now run the START scripts.
for i in /etc/rc$runlevel.d/S* ; do

   # Check if the subsystem is already up.
   subsys=${i#/etc/rc$runlevel.d/S??}
   [ -f /var/lock/subsys/$subsys ] && continue
   [ -f /var/lock/subsys/$subsys.init ] && continue
   check_runlevel "$i" || continue
         
   # If we're in confirmation mode, get user confirmation
   if [ "$do_confirm" = "yes" ]; then
      confirm $subsys
      rc=$?
      if [ "$rc" = "1" ]; then
         continue
      elif [ "$rc" = "2" ]; then
         do_confirm="no"
      fi
   fi

   update_boot_stage "$subsys"
   # Bring the subsystem up.
   [ -n "$UPSTART" ] && initctl emit --quiet starting JOB=$subsys
   if [ "$subsys" = "halt" -o "$subsys" = "reboot" ]; then
      export LC_ALL=C
      exec $i start
   fi
   $i start
   [ -n "$UPSTART" ] && initctl emit --quiet started JOB=$subsys
done
[ "$do_confirm" = "yes" ] && rm -f /var/run/confirm
exit 0

There's no real centralized "list".
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html


Return to “Distro talk”