Pimp my rc.conf daemons

From what I understand, selective editing of the DAEMONS line of rc.conf, including prefixing certain daemons with @, can significantly reduce boot time. I read a couple posts, as well as the wiki, searching for a solid answer, but the best I found was "which services to start background depends on your needs" which is a bit obvious. In any case, here's my current line:
DAEMONS=(syslog-ng !network netfs crond hal alsa hplip cups dhcdbd networkmanager laptop-mode gdm)
I'm sure it's a mess, as I've just slapped daemons on to fix problems, enable wireless, etc. so far.
If it's at all useful, this is a laptop that I commonly use as a workstation and with wireless.
Last edited by ArchPad (2007-06-13 14:34:41)

toofishes wrote:
ArchPad wrote:
From what I understand, selective editing of the DAEMONS line of rc.conf, including prefixing certain daemons with @, can significantly reduce boot time. I read a couple posts, as well as the wiki, searching for a solid answer, but the best I found was "which services to start background depends on your needs" which is a bit obvious. In any case, here's my current line:
DAEMONS=(syslog-ng !network netfs crond hal alsa hplip cups dhcdbd networkmanager laptop-mode gdm)
I'm sure it's a mess, as I've just slapped daemons on to fix problems, enable wireless, etc. so far.
If it's at all useful, this is a laptop that I commonly use as a workstation and with wireless.
Certain daemons likely depend on other things already having started before they initiate their startup, so you want to leave some alone. Here is my array, and although different than yours, notice how I leave quite a few things un-backgrounded due to dependencies and lump all the backgrounded ones at the end:
DAEMONS=(syslog-ng network iptables portmap @fcron @hal @sensors @knockd @netfs @sshd @ntpd @alsa @cups)
This would lead me to believe something like this would work for you (and WHY do you have network disabled?):
DAEMONS=(syslog-ng network hplip @crond @hal @netfs @alsa @cups @dhcdbd @networkmanager @laptop-mode @gdm)
I have syslog-ng and network backgrounded too and that works perfect.

Similar Messages

  • Adsl in rc.conf daemon array

    I tried to start pppoe as a background daemon @adsl in rc.conf, but it just doesn't work. It works fine when manually pppoe-start or as a non-background daemon, but it takes time to dial up.
    So how to configure it correctly?

    loserMcloser wrote:Do you have a firewall starting up after adsl in rc.conf? If so, maybe some firewall setting is stopping the pppoe connection attempt?
    No. I don't have a firewall.
    And the log message is the same as manually connect, which connect pppoe correctly.
    @adsl is the last daemon I start, but I'm not sure if there are some dependencies here.

  • Rc.conf DAEMONS '@' question

    In rc.conf it says to put a @ infront of a daemon to load it in the background.
    What exactly does this mean and which daemons should I consider loading up in the background?
    Cheers.

    It means the next daemon listed will start without waiting for the prefixed daemon to finish.. uh,  e.g my daemons line:
    DAEMONS=(syslog-ng network dbus hal portmap @fam @shorewall @samba @netfs @crond @alsa @mpd)
    Basically, shorewall will start before fam has finished loading, and so on.  You have to use a little common sense to figure out what needs to be running before other things can - like portmap must be running before fam I believe.  I'm not sure my setup is optimal, I could perhaps background one or two more, but i'm not all that concerned right now.
    Anyway it's worth playing with and this setup saves me maybe 10-20 secs in boot time at a guess.

  • RC.CONF Daemon & Module Order?

    Hello,
      I haven't found much related to the topic from some searches I have conducted, but I have been wondering.  Is there a prefered order to items within the Daemon and Module lines within rc.conf?  If so, could someone please provide a link to the page/document?  Thanks.

    the default order is good to start with. The only thing you have to worry about is the fact that certain daemons require another to be started first. For example, dbus needs to load before hal and ivman needs to load after both. You really need to know and understand the daemon in order place it properly, but if you're using them already it shouldn't be hard.
    The rest is personal preference.

  • Initscripts default rc.conf DAEMONS line and HAL

    Hello,
    Some application error messages recently caused me to realize that after setting up a new machine I was not starting the HAL daemon.
    Shouldn't this daemon be in the default DAEMONS=() line of rc.conf, as installed by the initscripts package?
    I started to flag the package "out of date" but I wasn't sure if this was the appropriate action for this issue/question.
    android

    I was refering to flaging the initscripts package, not the hal package.
    It's my impression that udev hot plugging as well as kde and gnome infrastructure (therefore all of the applications, not just if that's your desktop) all rely on hal at runtime.
    I still haven't quite run it to ground, but I also believe that the arch boot proccess uses hal as part of hardware discovery.
    So I think quite a bit of stuff depends on it and that it's a default in arch installations.
    Given this, it seemed it would be reasonable if it were included in the DAEMONS line by default, or at least if configuration dependent on it is selected at system installation time.
    In short, it seems like initscripts is "out of date" by not supporting hal out of the box.
    This issue is related to knowing which of the, ever growing list of, groups to which a user should be added in order to have access to the systems hardware. But that's another post.
    This is just my impression as a user. I'm eager to learn more, especially about the arch setup and boot process.
    Thanks for your reply...
    johnea

  • Default rc.conf daemons

    Just curious what network netfs and crond do ? They are loaded at startup in the daemons array of the default rc.conf and i am trying to reduce my startup processes and trying to determine if i need them.
    Thanks

    carick wrote:Just curious what network netfs and crond do ? They are loaded at startup in the daemons array of the default rc.conf and i am trying to reduce my startup processes and trying to determine if i need them.
    Thanks
    if you're trying to cut down on boot up time, putting '@' in front of each daemon will load them in the background. when i did that, it took about 10 seconds off my boot up time.

  • Daemons in rc.conf: order ok?

    This is the daemon line in rc.conf
    DAEMONS=(syslog-ng hal network netfs crond cups alsa slim)
    Is this ok? Do I need any other drivers? I want to print (cups!) stream music (via stream tuner) and look at my digital photos and manipulate them via gimp.

    You could background the last four.
    You could remove slim and instead edit /etc/inittab (id:5:initdefault: and run slim form the "x:5:respawn:" line). Why? it means you can turn the gui off and on easily (init 3, init 5 and from grub append 3 to the boot line to get text mode, multiuser. No need to make that change, just more flexibility.
    Last edited by vacant (2007-11-17 11:46:11)

  • Login prompt mixed up with daemons

    Hi,
    I'm getting login prompt mixed up with daemons. Here is the sreenshot.
    [dudko@archy ~]$ grep -i daemons= /etc/rc.conf
    DAEMONS=(wicd)
    Could you help me, please?
    Thanks.:)

    ewaller wrote:Are you using systemd or the are you using the default initscripts?
    default.
    HeSaid wrote:
    You need dbus in your daemons before wicd.
    DAEMONS=(dbus wicd)
    You will probably need other daemons to make other things work, for example cupsd for printing.
    Here is my daemon list:
    DAEMONS=(syslog-ng dbus wicd @acpid @laptop-mode @cupsd @cpufreq @ntpd @crond)
    Neal
    Sorry. My fault. That output was pasted after my last try without dbus.
    Normaly it looks like this
    DAEMONS=(syslog-ng dbus @wicd @ntpd @alsa @sshd)

  • Firestarter fails to start as a daemon, any way to keep retrying?

    Hello,
    I connect via wifi using network-manager (the connection starts even before logging into the desktop, it was like that at least the day I tested it). This is my daemons line in /etc/rc.conf:
    DAEMONS=(syslog-ng hal laptop-mode cpufreq !network dhcdbd networkmanager netfs firestarter fail2ban cups fcron alsa)
    At boot, "starting failstarter" fails. If I do ps, I cannot see firestarter. It only starts running when I log into the desktop, and launch firestarter's gui as root. So this kind of protection is not good, because other users do not have the root password and/or may forget to start firestarter's gui.
    Any ideas why firestarter fails to start as a daemon?
    Thank you very much in advance.
    Last edited by alleluia20 (2009-05-24 17:54:35)

    I'm not that sure, really. Total networking noob speaking here, but I just figured it won't matter what ports get hit so long as there are no server processes waiting on them.
    Don't take my word for it.
    Correct me ASAP if I'm wrong, please.
    Last edited by alun (2009-05-25 05:22:00)

  • Kde daemon crash at startup. kde on Arch.

    I just installed Arch the first time. after some unsuccessful attemps to with awesome, I tried to install xfce and kde. I managed to get both running without problems, but after further installation of additional packages (like amarok1, alsa, kile, qtoctave, stellarium, GIMP, Geeqie, Ktorrent, Kopete), the KDE daemon crashes at startup ad a kde crash bug report is displayed. I can't see any window content or windows any more, but other functionality like tabbing through windows or quicklaunch still works. I can get window content if I kill the plasma-desktop. (There also isn't any sound.)
    I followed thou the beginners guide and also official installation, checked the archlinux wiki on KDE and others, googled. I can't figure out what happened.
    I'm running following Daemons:
    /etc/rc.conf
    DAEMONS=(hwclock @syslog-ng dbus netfs crond alsa @cups)
    I start kdm through etc/inittab as suggested on archwiki kde.
    startx runs fine, I suspect thou that I'm missing some xinit config files, but not sure thou what is needed as I start kdm through inittab.
    I'd be glad for any suggestions or help! =)
    full /etc/inittab, /etc/rc.conf, /var/log/Xorg.0.log on:
    http://pastebin.com/UBysin7q
    I have a Lenovo X220 Laptop plus externalmonitor, which runs fine.

    Problem solved. I reinstalled arch and kde desktop environment. everything works smooth now
    thank you thou anyway for your help. I looked into ~/.xsession-errors , but there we're just too many error messages. I believe the problem was linked to phonon-vlc.

  • [SOLVED] Start offlineimap as a daemon?

    I just installed offlineimap so I can use mutt to view IMAP email. How can I start it as a daemon so it automatically syncs email upon login? I found an rtorrent daemon script on the forum and just changed it to offlineimap, but it has a few problems.
    1. It does not work upon init. It works if I manually do /etc/rc.d/offlineimap start.
    2. It does not stop at all, regardless of how I do it - either manually or automatically.
    Anything I can do to get this working?
    Thanks.
    #!/bin/bash
    . /etc/rc.conf
    . /etc/rc.d/functions
    [ -z "$OFFLINEIMAP" ] && OFFLINEIMAP=/usr/bin/offlineimap
    [ -z "$OFFLINEIMAP_USER" ] && OFFLINEIMAP_USER=oliver
    [ -z "$OFFLINEIMAP_HOME" ] && OFFLINEIMAP_HOME=/home/oliver
    [ -z "$OFFLINEIMAP_SOCKET" ] && OFFLINEIMAP_SOCKET=$OFFLINEIMAP_HOME/.socket
    [ -z "$OFFLINEIMAP_LOCK" ] && OFFLINEIMAP_LOCK=$OFFLINEIMAP_HOME/.session/offlineimap.lock
    [ -z "$OFFLINEIMAP_DTACH" ] && OFFLINEIMAP_DTACH="/usr/bin/dtach -n $OFFLINEIMAP_SOCKET -z"
    case "$1" in
    start)
    stat_busy "Starting offlineimap"
    PID=`pidof -o %PPID $OFFLINEIMAP`
    if [ -z "$PID" ]; then
    [ -S $OFFLINEIMAP_SOCKET ] && rm $OFFLINEIMAP_SOCKET &> /dev/null
    [ -f $OFFLINEIMAP_LOCK ] && rm $OFFLINEIMAP_LOCK &> /dev/null
    fi
    /bin/su -c "$OFFLINEIMAP_DTACH $OFFLINEIMAP &> /dev/null" \
    $OFFLINEIMAP_USER
    if [ $? -gt 0 ]; then
    stat_fail
    else
    add_daemon offlineimap
    stat_done
    fi
    stop)
    stat_busy "Stopping offlineimap"
    PID=`pidof -o %PPID $OFFLINEIMAP`
    [ ! -z "$PID" ] && kill -s INT $PID &> /dev/null
    if [ $? -gt 0 ]; then
    stat_fail
    else
    rm_daemon offlineimap
    stat_done
    fi
    restart)
    $0 stop
    sleep 1
    $0 start
    echo "usage: $0 {start|stop|restart}"
    esac
    exit 0
    Last edited by MTsoul (2009-02-04 08:10:21)

    MTsoul wrote:1. It does not work upon init. It works if I manually do /etc/rc.d/offlineimap start.
    Have to ask, as you didn't mention it - did you add it to the rc.conf DAEMONS array?

  • Adding hal to rc.conf??

    what is the wording to add hal to rc.conf?? I have tried adding  hal,hald, hal start..to rc.conf daemon section but it gives error on boot saying  "hal unknown command'..or something like that...i have followed wiki beginners guide and am stuck at this part..what should the rc.conf hal entry look like?
    Just to add if i use /etc/rc.d/hal start   it works..and I can use my mouse and keyboard..
    Last edited by stratotak (2009-02-08 18:52:06)

    Put in the DAEMONS array. This is what it looks like in my rc.conf:
    DAEMONS=(syslog-ng hal network net-profiles !netfs @crond @openntpd @avahi-daemon @cups @sshd @smbnetfs @privoxy @irqbalance oss @mpd)

  • Daemons line

    Here's my daemons line in the rc.conf:
    DAEMONS=(syslog-ng net-profiles network firestarter netfs portmap fam dbus hal crond alsa sensors mysqld)
    Are there any I can make start in the background or that are unnecessary?  Also, what are netfs and crond?
    Last edited by Gauvenator (2008-05-03 23:42:08)

    venox wrote:
    dolby wrote:hal starts dbus if its not started and i dont think theres a problem with backgrounding all the daemons
    I'm not sure about this. But I think it's not a good thing to background daemons of which other daemons depend. Like backgrounding network, while others need it to start correctly. You can't just assume that the backgrounded daemon will be up and running until the other daemon starts.
    But again, I'm not sure about this.
    Anyway, what's the difference of having a system that boots in 30 or 20 seconds when you're going to use it for hours?
    Yes that's what I was thinking too.  A daemon could depend on another being running.
    Well I'm happy atm, but just for the hell of it I'm going to see how quick it is without net-profiles

  • Help! Confusion over how to setup intel3945 wireless and rc.conf

    Hi,
    I'm very confused.  I've already read through all the wikis and searched many forum posts.  I can't get my wireless intel3945 to work on my dell vostro 1400.
    Iwconfig says the wireless card is at wlan0 and dmesg | grep iwl says it has detected it.  However, when I try a iwlist wlan0 scan it returns :
    wlan0 Interface doesn't support scanning : Network is down
    I think the problem is that I don't know how to setup rc.conf correctly or use the command line to test the wireless.  Forum posts say many different things on how this is done.
    These are the steps I have taken:
    uninstalled the ipw3945 and ipw3945-ucode and ipw3945d.
    installed iwlwifi and iwlwifi-3945-ucode
    in my rc.conf modules, added iwl3945.
    I'm not sure how to setup the networking section, this what I have now:
    lo="lo 127.0.01"
    eth0="dhcp"
    wlan0="dhcp"
    INTERFACES=(lo etho)
    gateway="default gw 192.168.1.1"
    ROUTES=(!gateway)
    And in my dameons I have 'network'.
    How can I scan for networks and connect to them on the commandline?  I'd prefer not to use a gui tool because they never work and never tell me why they're not working.
    Any help is greatly appreciated!
    Cheers!
    kilolima

    iphitus wrote:
    broch wrote:I have ipw3945 and iwl3945 working with wpa2 (or vpn)
    (less complicatd than the above)
    don't use netcfg2
    Why?
    no particular reason.
    Simply when I configured wireless, netcfg2 wasn't available. Since then it (wireless) works, so not having any problems, I did not modify network setup. Next week or so I am going to install Arch on my daughter's laptop (per her request ) so I will try netcfg2.
    So this is what I have for ipw3945 wpa2 or iwl3945 with wpa2
    Below you will find a lot of words so read slowly but there is not much actual work
    ipw3945 setup
    kernel 2.6.23.x (Arch or vanilla)
    or
    kernel 2.6.24/2.6.24-gitX (patched with ipw3945 patch from gentoo -> compiling separate module for 2.6.24 may fail. if you want kernel patch I can post a link)
    for default kernel install Arch packages for ipw3945, ipw3945d, ipw3945-ucode
    or
    if you want to compile modules, you will also need ieee80211 (first uninstall kernel's default, then install from sources otherwise ieee80211 from sources may refuse to install)
    modify /etc/rc.conf
    DAEMONS=(.... @ipw3945d @network ....)
    that is all you don't need to add ipw3945 to MODULES=(.....)
    because ipw3945d will automatically start ipw3945 module
    do not list eth1 in network config section:
    lo="lo 127.0.0.1"
    eth0="dhcp"
    INTERFACES=(eth0)
    as you see, in my case only eth0 (wired) is listed and eth1 (wireless) is not listed
    now you are done with basic network configuration for ipw3945, restart network/computer to bring up ipw3945d/ipw3945
    check if modules are up and basic network is set:
    #lsmod | grep ipw
    #ifconfig -a
    or
    #iwconfig
    if all is o.k. configure
    WPA2:
    configure router for wpa2
    client: basically follow Arch wiki:
    configure wpa_supplicant (installed already of course)
    #wpa_passphrase your_ssid your_psk
    keep terminal window open with created encrypted wpa passphrase  and in the second terminal window edit /etc/wpa_supplicant.conf
    ctrl_interface=/var/run/wpa_supplicant
    network={
            ssid="your_ssid"
            scan_ssid=1
            proto=WPA RSN
            key_mgmt=WPA-PSK
            pairwise=CCMP TKIP
            group=CCMP TKIP
                    psk=whatever_output_from_wpa_passphrase
    Above pairwise and group setup will depend on your router (network capabilities)
    almost done:
    run
    #wpa_supplicant -Bw -Dwext -i eth1 -c/etc/wpa_supplicant.conf
    the above assumes that your ipw3945 is set as eth1 (from iwconfig output)
    to connect to the network I am using "wireless assistant" http://www.kde-apps.org/content/show.ph … tent=21832
    that is all for ipw3945. You may automate network starting/connecting to wpa2 by writing simple script.
    iwl3945
    --kernel 2.6.23.x
    install iwlwifi and iwlwifi-3945-ucode
    --kernel 2.6.24.x
    install only iwlwifi-3945-ucode as kernel has iwlwifi module incorporated
    default iwlwifi does not support LED so I suggest to install something like knemo for kde to show active network icon. The latest iwlwifi does support LED but it is not yet incorporated into 2.6.24 vanilla kernel.
    if you have kernel 2.6.23.x with external iwlwifi module
    modify /etc/rc.conf
    and add iwlwifi to
    MODULES=(.....)
    nothing else is required.
    if you have kernel 2.6.24 with integrated iwlwifi module you don't have to edit /etc/rc.conf
    As in the case of ipw3945, I do not list wireless interface (wlan0) in /etc/rc.conf
    for kernel 2.6.23.x
    load module/restart network or simply restart computer
    check if module is up
    #lsmod | grep iwl
    #iwconfig
    or
    #ifconfig -a
    WPA2
    same wpa_supplicant.conf as above, so if you already have it no need for modifications.
    start wpa2
    #wpa_supplicant -Bw -Dwext -i wlan0 -c/etc/wpa_supplicant.conf
    the only difference in the command is wireless interface: wlan0
    connect to the network, again I am using "wireless assistant"
    vpn
    I am using cisco vpn. Client is provided by vpn host, cisco does not provide vpn client for individual download, but you can find it on line.
    vpn host will provide pcf file for you
    - install vpnclient
    - copy your VPN profile (vpn.pcf) to the
    /etc/CiscoSystemsVPNClient/Profiles
    directory
    -- start vpn client
    /opt/cisco-vpnclient/bin/vpnclient connect vpn pcf_file_name
    provide username and password and off you go
    From my experience none of linux gui for vpn works reliably so you will have to resort to the command line.
    That is all, a lot of writing, but actual ipw3945 and iwl3945 configuration is straightforward and very short.
    Hopefully this will work for you.
    forgot to add regarding vpnclient (cisco)
    you will have to modify
    /etc/init.d/vpnclient_init
    line 38 and line 101
    replace
    /sbin/lsmod
    with
    /bin/lsmod
    Last edited by broch (2008-02-07 15:55:45)

  • Modified rc.multi for starting daemons

    I'd like to share some of my modification about the daemon starting process here
    What I've done is to add an option for DAEMONS in rc.conf, which allows starting a daemon after all the previous dependencies are actually done.
    This is done by a creating a named pipe for a before it starts, and removing it after the daemon completes.
    Daemons with dependencies are guaranteed to either be blocked by reading the named pipe or fail to find the named pipe (which means it already completed) by some tricks.
    Here is the snippet from the rc.multi:
    depsd="/var/lock/boot"
    mkdir -p "$depsd"
    rm -f "$depsd"/*
    start_daemon_dep(){
    local dep daemon="$1"
    shift
    for dep; do
    cat "$depsd/$dep" 2>/dev/null
    done
    start_daemon "$daemon"
    /etc/rc.d/daemon_complete "$depsd/$daemon"
    make_dep(){
    mkfifo "$depsd/$1"
    (cat "$depsd/$1") 2>/dev/null &
    stat_bkgd "Starting daemon $1"
    # Start daemons
    for daemon in "${DAEMONS[@]}"; do
    d=(${daemon//:/ })
    case ${d[0]:0:1} in
    '!') continue;;
    make_dep "${d[0]#@}"
    (start_daemon_dep ${d[0]#@} ${d[1]//,/ }) 1>/dev/null &
    make_dep "${d[0]}"
    start_daemon_dep ${d[0]} ${d[1]//,/ } 1>/dev/null
    esac
    done
    /etc/rc.d/daemon_complete is the programing doing the atomic guarantee.
    daemon_complete.c:
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <stdio.h>
    #include <fcntl.h>
    int main(int argc, char **argv){
    int fd;
    if((fd = open(argv[1], O_WRONLY))< 0)
    return 1;
    if(unlink(argv[1]) < 0)
    return 1;
    if(close(fd) < 0)
    return 1;
    return 0;
    Then we can write something like the following in rc.conf:
    DAEMONS=(hwclock
    rsyslogd
    @network
    @ntpdate:network
    @dnsmasq:network
    dbus
    kdm:dbus,network
    crond)
    This means that ntpdate is running in background, but it won't start until its dependency, network, completes in background.
    Multiple dependencies can be applied like the one kdm does: it relies on both dbus and network.
    However, changing DAEMONS array syntax breaks some functionalities in /etc/rc.d/functions, so we have to accordingly change the file.
    The file is here.
    edit: I shouldn't put the executable in /etc/rc.d/functions.d/, so now it's in /etc/rc.d/
    Last edited by realturner (2012-04-08 11:13:15)

    I cannot contribute any specific thoughts yet,
    but this is interesting.
    I'll just post and follow this thread for the moment

Maybe you are looking for