You are not logged in.
The runit-init package can replace systemd as PID1 (init) — this is the first process started by the kernel and is responsible for booting the box and controlling all running services and daemons in BunsenLabs.
https://packages.debian.org/stretch/runit-init
See http://smarden.org/runit/benefits.html
For me, an important feature is the exceptionally small code base:
One of the runit project's principles is to keep the code size small. As of version 1.0.0 of runit, the runit.c source contains 330 lines of code; the runsvdir.c source is 274 lines of code, the runsv.c source 509. This minimizes the possibility of bugs introduced by programmer's fault, and makes it more easy for security related people to proofread the source code.
sudo apt install runit-init dbus-x11
Then reboot
The bl-exit package will subsequently fail on the reboot and shutdown options unless a `sudo` NOPASSWD exception is added for /sbin/{reboot,poweroff} and some wrapper scripts created:
# ~/bin/reboot
sudo /sbin/reboot
# ~/bin/poweroff
sudo /sbin/poweroff
To add custom scripts at startup, create a new service folder under /etc/sv/ containing a run file and (optionally) a finish file, both executable, that define the requisite actions.
Then symlink that folder to the runlevel under /etc/runit/runsvdir/default/ (or whichever custom runlevel is preferred) to activate the service at boot.
Example: I normally use systemd-networkd to connect and this doesn't work under runit, for obvious reasons, so I first created a wireless folder for my new service:
sudo mkdir -p /etc/sv/wireless
Then I wrote the run script (comments added):
# /etc/sv/wireless/run
#!/bin/sh
if='wlp2s0' # interface name
ip='192.168.1.69/24' # IP adddress
gw='192.168.1.254' # Gateway (address of router)
/sbin/ip link set "$if" up # bring up interface
/sbin/ip address add "$ip" dev "$if" # assign IP address
/sbin/ip route add default via "$gw" # assign gateway route
exec /sbin/wpa_supplicant -i "$if" -c /etc/wpa_supplicant/wpa_supplicant-"$if".conf # associate with access point using wpa_supplicant(8), this process will be restarted if it fails
And the finish script:
# /etc/sv/wireless/finish
#!/bin/sh
if='wlp2s0'
/sbin/ip address flush dev "$if"
/sbin/ip link set "$if" down
(Yes, I know they're crap, constructive criticism is welcomed but please don't laugh)
Then I made them executable and symlinked the service folder to the default runlevel:
sudo chmod +x /etc/sv/wireless/{run,finish}
sudo ln -s /etc/sv/wireless /etc/runit/runsvdir/default
The service should then start at the next boot automatically, check with:
sudo sv status wireless
Which should return the status & PID:
root@Helium:~ # sv s wireless
run: wireless: (pid 2005) 8070s
root@Helium:~ #
More complete instructions can be obtained from the FAQ:
Offline