|/
|\ISS

*ARCHIVED*
OFFICIAL SITE

News
Blog

Wiki

Install KISS
FAQ

Package System
Package Manager
Software

Guidestones

Testimonials
Screenshots
Team

Contact
Donate
Website
IRC

GitHub
Git (mirror)
ML (archive)



wiki / init / busybox                                             Edit this page

Edited (3f3d3e2) at 2021-04-03 by Dilyn Corner


MANAGING SERVICES WITH BUSYBOX
________________________________________________________________________________

KISS uses busybox's init with busybox's runit utilities for services by default.


Basic usage
________________________________________________________________________________

+---------+--------------------------------------------------------------------+
| Action  | Command                                                            |
|---------+--------------------------------------------------------------------|
| List    | $ ls /etc/sv/                                                      |
|         |                                                                    |
| Enable  | $ ln -s /etc/sv/SERVICE_NAME/ /var/service                         |
| Disable | $ unlink /var/service/SERVICE_NAME                                 |
|         |                                                                    |
| Stop    | $ sv down SERVICE_NAME                                             |
| Start   | $ sv up   SERVICE_NAME                                             |
|         |                                                                    |
+---------+--------------------------------------------------------------------+

See https://git.busybox.net/busybox/tree/runit/sv.c for full usage.


Running commands during boot/shutdown
________________________________________________________________________________

This can be accomplished in a generic way (using /etc/rc.d) or by modifying the
busybox-init only /etc/inittab file.


    Using /etc/rc.d
    ____________________________________________________________________________

    This method of configuration works with every init system which uses the
    KISS init framework. See $/kiss-community/init

    +--------------------------------------------------------------------------+
    | Run command during boot.                                                 |
    +--------------------------------------------------------------------------+
    |                                                                          |
    |  # Load the iwlwifi kernel module.                                       |
    |  echo "modprobe iwlwifi" > /etc/rc.d/wifi.boot                           |
    |                                                                          |
    +--------------------------------------------------------------------------+
    | Run command during shutdown.                                             |
    +--------------------------------------------------------------------------+
    |                                                                          |
    |  # Save system time to hwclock.                                          |
    |  echo "hwclock -w" > /etc/rc.d/hwclock.pre.shutdown                      |
    |                                                                          |
    +--------------------------------------------------------------------------+
    |                                                                          |
    |   TIP: .post.shutdown can also be used.                                  |
    |                                                                          |
    +--------------------------------------------------------------------------+


    Using /etc/inittab
    ____________________________________________________________________________

    +--------------------------------------------------------------------------+
    | Run command during boot.                                                 |
    +--------------------------------------------------------------------------+
    |                                                                          |
    |  # Load the iwlwifi kernel module.                                       |
    |  ::once:/bin/modprobe iwlwifi                                            |
    |                                                                          |
    +--------------------------------------------------------------------------+
    | Run command during shutdown.                                             |
    +--------------------------------------------------------------------------+
    |                                                                          |
    |  # Save system time to hwclock.                                          |
    |  ::shutdown:/bin/hwclock -w                                              |
    |                                                                          |
    +--------------------------------------------------------------------------+



________________________________________________________________________________

This site is an archive of a previous version of KISS's website. The current
version can be found at https://kisslinux.org/.

Dylan Araps    (C) 2019-2020
kiss-community (C) 2020-2021
Dilyn Corner   (C) 2021

Linux(R) is the registered trademark of Linus Torvalds in the U.S. and
other countries.