├── ignite ├── util │ ├── reboot │ ├── poweroff │ ├── Makefile │ ├── runlevel.sh │ ├── pause.c │ ├── modules-load │ ├── pause.1 │ ├── halt.8 │ ├── shutdown.sh │ ├── zzz │ ├── halt.c │ ├── shutdown.8 │ └── zzz.8 ├── etc │ ├── runit │ │ ├── 1 │ │ ├── 2 │ │ ├── 3 │ │ ├── reboot │ │ ├── stopit │ │ ├── runsvdir │ │ └── ctrlaltdel │ └── sv │ │ ├── alsa │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── dbus │ │ ├── supervise │ │ └── run │ │ ├── dkms │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── eth0 │ │ ├── supervise │ │ └── run │ │ ├── mpd │ │ ├── supervise │ │ └── run │ │ ├── nfsd │ │ ├── supervise │ │ ├── finish │ │ ├── control │ │ │ └── h │ │ └── run │ │ ├── ntpd │ │ ├── supervise │ │ └── run │ │ ├── slim │ │ ├── supervise │ │ └── run │ │ ├── sshd │ │ ├── supervise │ │ └── run │ │ ├── tor │ │ ├── supervise │ │ └── run │ │ ├── wicd │ │ ├── supervise │ │ └── run │ │ ├── acpid │ │ ├── supervise │ │ └── run │ │ ├── agetty-tty1 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── agetty-tty2 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── agetty-tty3 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── agetty-tty4 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── agetty-tty5 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── agetty-tty6 │ │ ├── run │ │ ├── finish │ │ └── supervise │ │ ├── aiccu │ │ ├── supervise │ │ └── run │ │ ├── apache │ │ ├── supervise │ │ └── run │ │ ├── auditd │ │ ├── supervise │ │ └── run │ │ ├── autofs │ │ ├── supervise │ │ └── run │ │ ├── colord │ │ ├── supervise │ │ └── run │ │ ├── crond │ │ ├── supervise │ │ └── run │ │ ├── cupsd │ │ ├── supervise │ │ └── run │ │ ├── dhcp4 │ │ ├── supervise │ │ └── run │ │ ├── dhcp6 │ │ ├── supervise │ │ └── run │ │ ├── docker │ │ ├── supervise │ │ ├── log │ │ │ ├── run │ │ │ └── supervise │ │ └── run │ │ ├── hdapsd │ │ ├── supervise │ │ └── run │ │ ├── mdadm │ │ ├── supervise │ │ └── run │ │ ├── nginx │ │ ├── supervise │ │ └── run │ │ ├── pcscd │ │ ├── supervise │ │ └── run │ │ ├── pdnsd │ │ ├── supervise │ │ └── run │ │ ├── radvd │ │ ├── supervise │ │ └── run │ │ ├── smartd │ │ ├── run │ │ ├── supervise │ │ └── finish │ │ ├── tftpd │ │ ├── supervise │ │ └── run │ │ ├── ulogd │ │ ├── supervise │ │ └── run │ │ ├── vnstat │ │ ├── supervise │ │ └── run │ │ ├── wlan0 │ │ ├── supervise │ │ └── run │ │ ├── agetty-ttyS0 │ │ ├── finish │ │ ├── supervise │ │ └── run │ │ ├── bitlbee │ │ ├── supervise │ │ └── run │ │ ├── cpupower │ │ ├── supervise │ │ └── run │ │ ├── ddclient │ │ ├── supervise │ │ └── run │ │ ├── dnsmasq │ │ ├── supervise │ │ └── run │ │ ├── dovecot │ │ ├── supervise │ │ └── run │ │ ├── haveged │ │ ├── supervise │ │ └── run │ │ ├── hwclock │ │ ├── supervise │ │ ├── run │ │ └── finish │ │ ├── mongodb │ │ ├── supervise │ │ └── run │ │ ├── opensmtpd │ │ ├── supervise │ │ ├── log │ │ │ ├── supervise │ │ │ └── run │ │ └── run │ │ ├── openvpn │ │ ├── supervise │ │ └── run │ │ ├── postfix │ │ ├── supervise │ │ └── run │ │ ├── privoxy │ │ ├── supervise │ │ └── run │ │ ├── rpc.gssd │ │ ├── supervise │ │ ├── log │ │ │ ├── supervise │ │ │ └── run │ │ └── run │ │ ├── rpc.statd │ │ ├── supervise │ │ └── run │ │ ├── rpcbind │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── shorewall │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── sulogin │ │ ├── supervise │ │ └── run │ │ ├── syslog-ng │ │ ├── run │ │ └── supervise │ │ ├── wlan0-wpa │ │ ├── supervise │ │ ├── log │ │ │ ├── supervise │ │ │ └── run │ │ └── run │ │ ├── colord-sane │ │ ├── supervise │ │ └── run │ │ ├── laptop-mode │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── mpdscribble │ │ ├── supervise │ │ └── run │ │ ├── rpc.idmapd │ │ ├── supervise │ │ └── run │ │ ├── rpc.mountd │ │ ├── supervise │ │ ├── log │ │ │ ├── supervise │ │ │ └── run │ │ └── run │ │ ├── rpc.svcgssd │ │ ├── supervise │ │ ├── log │ │ │ ├── supervise │ │ │ └── run │ │ └── run │ │ ├── shorewall6 │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── avahi-daemon │ │ ├── supervise │ │ └── run │ │ ├── net-auto-wired │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── net-auto-wireless │ │ ├── supervise │ │ ├── finish │ │ └── run │ │ ├── agetty-generic │ │ ├── finish │ │ └── run │ │ └── mksv ├── COPYING ├── rc.conf.example ├── ignite.install └── PKGBUILD ├── .gitignore ├── COPYING ├── ignite-git ├── ignite.install └── PKGBUILD ├── runit-musl ├── _sv └── PKGBUILD └── README /ignite/util/reboot: -------------------------------------------------------------------------------- 1 | halt -------------------------------------------------------------------------------- /ignite/util/poweroff: -------------------------------------------------------------------------------- 1 | halt -------------------------------------------------------------------------------- /ignite/etc/runit/reboot: -------------------------------------------------------------------------------- 1 | /run/runit/reboot -------------------------------------------------------------------------------- /ignite/etc/runit/stopit: -------------------------------------------------------------------------------- 1 | /run/runit/stopit -------------------------------------------------------------------------------- /ignite/etc/runit/runsvdir: -------------------------------------------------------------------------------- 1 | /run/runit/runsvdir -------------------------------------------------------------------------------- /ignite/etc/sv/alsa/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.alsa -------------------------------------------------------------------------------- /ignite/etc/sv/dbus/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dbus -------------------------------------------------------------------------------- /ignite/etc/sv/dkms/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dkms -------------------------------------------------------------------------------- /ignite/etc/sv/eth0/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.eth0 -------------------------------------------------------------------------------- /ignite/etc/sv/mpd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.mpd -------------------------------------------------------------------------------- /ignite/etc/sv/nfsd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.nfsd -------------------------------------------------------------------------------- /ignite/etc/sv/ntpd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.ntpd -------------------------------------------------------------------------------- /ignite/etc/sv/slim/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.slim -------------------------------------------------------------------------------- /ignite/etc/sv/sshd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.sshd -------------------------------------------------------------------------------- /ignite/etc/sv/tor/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.tor -------------------------------------------------------------------------------- /ignite/etc/sv/wicd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.wicd -------------------------------------------------------------------------------- /ignite/etc/sv/acpid/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.acpid -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty1/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty2/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty3/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty4/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty5/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty6/run: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/run -------------------------------------------------------------------------------- /ignite/etc/sv/aiccu/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.aiccu -------------------------------------------------------------------------------- /ignite/etc/sv/apache/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.apache -------------------------------------------------------------------------------- /ignite/etc/sv/auditd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.auditd -------------------------------------------------------------------------------- /ignite/etc/sv/autofs/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.autofs -------------------------------------------------------------------------------- /ignite/etc/sv/colord/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.colord -------------------------------------------------------------------------------- /ignite/etc/sv/crond/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.crond -------------------------------------------------------------------------------- /ignite/etc/sv/cupsd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.cupsd -------------------------------------------------------------------------------- /ignite/etc/sv/dhcp4/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dhcp4 -------------------------------------------------------------------------------- /ignite/etc/sv/dhcp6/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dhcp6 -------------------------------------------------------------------------------- /ignite/etc/sv/docker/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.docker -------------------------------------------------------------------------------- /ignite/etc/sv/hdapsd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.hdapsd -------------------------------------------------------------------------------- /ignite/etc/sv/mdadm/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.mdadm -------------------------------------------------------------------------------- /ignite/etc/sv/nginx/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.nginx -------------------------------------------------------------------------------- /ignite/etc/sv/pcscd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.pcscd -------------------------------------------------------------------------------- /ignite/etc/sv/pdnsd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.pdnsd -------------------------------------------------------------------------------- /ignite/etc/sv/radvd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.radvd -------------------------------------------------------------------------------- /ignite/etc/sv/smartd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec smartd -n 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/smartd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.smartd -------------------------------------------------------------------------------- /ignite/etc/sv/tftpd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.tftpd -------------------------------------------------------------------------------- /ignite/etc/sv/ulogd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.ulogd -------------------------------------------------------------------------------- /ignite/etc/sv/vnstat/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.vnstat -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.wlan0 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | */src 2 | */pkg 3 | *.tar.* 4 | ignite-git/ignite -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty1/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty2/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty3/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty4/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty5/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty6/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-ttyS0/finish: -------------------------------------------------------------------------------- 1 | /etc/sv/agetty-generic/finish -------------------------------------------------------------------------------- /ignite/etc/sv/bitlbee/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.bitlbee -------------------------------------------------------------------------------- /ignite/etc/sv/cpupower/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.cpupower -------------------------------------------------------------------------------- /ignite/etc/sv/crond/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec crond -n 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/ddclient/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.ddclient -------------------------------------------------------------------------------- /ignite/etc/sv/dnsmasq/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dnsmasq -------------------------------------------------------------------------------- /ignite/etc/sv/dovecot/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.dovecot -------------------------------------------------------------------------------- /ignite/etc/sv/haveged/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.haveged -------------------------------------------------------------------------------- /ignite/etc/sv/hwclock/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.hwclock -------------------------------------------------------------------------------- /ignite/etc/sv/mongodb/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.mongodb -------------------------------------------------------------------------------- /ignite/etc/sv/opensmtpd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.opensmtpd -------------------------------------------------------------------------------- /ignite/etc/sv/openvpn/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.openvpn -------------------------------------------------------------------------------- /ignite/etc/sv/pdnsd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/pdnsd 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/postfix/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.postfix -------------------------------------------------------------------------------- /ignite/etc/sv/privoxy/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.privoxy -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.gssd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.gssd -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.statd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.statd -------------------------------------------------------------------------------- /ignite/etc/sv/rpcbind/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpcbind -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.shorewall -------------------------------------------------------------------------------- /ignite/etc/sv/sulogin/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.sulogin -------------------------------------------------------------------------------- /ignite/etc/sv/syslog-ng/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec syslog-ng -F 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/syslog-ng/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.syslog-ng -------------------------------------------------------------------------------- /ignite/etc/sv/ulogd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/ulogd 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0-wpa/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.wlan0-wpa -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty1/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty1 -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty2/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty2 -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty3/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty3 -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty4/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty4 -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty5/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty5 -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-tty6/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-tty6 -------------------------------------------------------------------------------- /ignite/etc/sv/auditd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/auditd -n 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/colord-sane/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.colord-sane -------------------------------------------------------------------------------- /ignite/etc/sv/docker/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec logger -t docker 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/docker/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.docker-log -------------------------------------------------------------------------------- /ignite/etc/sv/laptop-mode/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.laptop-mode -------------------------------------------------------------------------------- /ignite/etc/sv/mpdscribble/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.mpdscribble -------------------------------------------------------------------------------- /ignite/etc/sv/pcscd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/pcscd -f 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.idmapd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.idmapd -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.mountd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.mountd -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.svcgssd/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.svcgssd -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall6/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.shorewall6 -------------------------------------------------------------------------------- /ignite/etc/sv/vnstat/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/vnstatd -n 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-ttyS0/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.agetty-ttyS0 -------------------------------------------------------------------------------- /ignite/etc/sv/avahi-daemon/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.avahi-daemon -------------------------------------------------------------------------------- /ignite/etc/sv/bitlbee/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/sbin/bitlbee -F -n 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/colord/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/lib/colord/colord 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/hwclock/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec chpst -b hwclock pause 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wired/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.net-auto-wired -------------------------------------------------------------------------------- /ignite/etc/sv/ntpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ntpd -g -u ntp:ntp -n 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/opensmtpd/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.opensmtpd-log -------------------------------------------------------------------------------- /ignite/etc/sv/opensmtpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/smtpd -d 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.gssd/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.gssd-log -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.mountd/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.mountd-log -------------------------------------------------------------------------------- /ignite/etc/sv/slim/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec /usr/bin/slim 2>&1 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0-wpa/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.wlan0-wpa-log -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.svcgssd/log/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.rpc.svcgssd-log -------------------------------------------------------------------------------- /ignite/etc/sv/alsa/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | exec /usr/bin/alsactl store 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/colord-sane/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/lib/colord/colord-sane 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/dkms/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/lib/systemd/scripts/dkms stop 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/dnsmasq/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/dnsmasq -k --user=dnsmasq 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/haveged/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/sbin/haveged -F -w 1024 -v 1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wireless/supervise: -------------------------------------------------------------------------------- 1 | /run/runit/supervise.net-auto-wireless -------------------------------------------------------------------------------- /ignite/etc/sv/nginx/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/nginx -g 'daemon off;' 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/radvd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec radvd --nodaemon --logmethod=syslog 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/sbin/shorewall stop 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/mpdscribble/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/bin/mpdscribble --no-daemon 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/opensmtpd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec logger -t opensmtpd -p mail.info 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpcbind/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | umount /var/lib/nfs/rpc_pipefs || true 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall6/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec /usr/sbin/shorewall6 stop 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/tor/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec chpst -u tor tor --runasdaemon 0 2>&1 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/nfsd/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /usr/bin/exportfs -a -u 3 | /usr/bin/rpc.nfsd 0 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.gssd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec logger -t rpc.gssd -p daemon.notice 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.mountd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec logger -t rpc.idmapd -p daemon.notice 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/docker/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec chpst -o 1048576 -p 1048576 docker -d 2>/dev/null 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.svcgssd/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec logger -t rpc.svcgssd -p daemon.notice 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/wicd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sv check dbus >/dev/null && 3 | exec wicd --no-daemon 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/avahi-daemon/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sv check dbus >/dev/null && 3 | exec avahi-daemon -s 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/sulogin/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec setsid /sbin/sulogin -p /dev/tty1 2>&1 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/alsa/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | /usr/bin/alsactl restore 4 | exec chpst -b alsa pause 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/tftpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/tftpd 3 | exec /usr/sbin/in.tftpd -L $TFTPD_ARGS 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/dhcp4/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/dhcp 3 | exec /usr/sbin/dhcpd -4 -f --no-pid $DHCP4_ARGS 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/dhcp6/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/dhcp 3 | exec /usr/sbin/dhcpd -6 -f --no-pid $DHCP6_ARGS 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/nfsd/control/h: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /usr/bin/exportfs -a -r 3 | true # don't hup the pause(1) process 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/openvpn/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec /usr/sbin/openvpn --cd /etc/openvpn --config openvpn.conf 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/dovecot/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | install -d -m 0755 -o root -g root /var/run/dovecot 3 | exec dovecot -F 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/eth0/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec dhcpcd -qLB -t 0 -C wpa_supplicant -C timezone -C hostname ${PWD##*/} 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec dhcpcd -qLB -t 0 -C wpa_supplicant -C timezone -C hostname ${PWD##*/} 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/cpupower/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | /usr/lib/systemd/scripts/cpupower 4 | exec chpst -b cpupower pause 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/mongodb/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec chpst -u mongodb:daemon /usr/bin/mongod --quiet --config /etc/mongodb.conf 3 | -------------------------------------------------------------------------------- /ignite/etc/sv/smartd/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # no devices found, disable smartd 3 | [ $1 = 17 ] && sv d $(dirname $0) 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-generic/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | service=$(basename $(pwd)) 3 | tty=${service/*-} 4 | exec utmpset -w $tty 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-ttyS0/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tty=${PWD##*-} 3 | exec setsid /sbin/agetty -8 -s 9600 --noclear $tty linux 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/cupsd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sv check colord >/dev/null && sv check colord-sane >/dev/null && 3 | exec cupsd -f 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/dkms/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | /usr/lib/systemd/scripts/dkms start >/dev/null 4 | exec chpst -b dkms pause 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wired/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/netcfg 3 | exec /usr/bin/netcfg iface-down $WIRED_INTERFACE 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/mpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | install -d -m 0755 -o mpd -g mpd /run/mpd 3 | exec /usr/bin/mpd --no-daemon /etc/mpd.conf 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/dbus/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ ! -d /run/dbus ] && install -m755 -g 81 -o 81 -d /run/dbus 3 | exec dbus-daemon --system --nofork 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/hwclock/finish: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . /etc/rc.conf 3 | hwclock --adjust ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z)} 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/laptop-mode/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | rm -f /var/run/laptop-mode-tools/enabled 3 | exec /usr/sbin/laptop_mode stop >/dev/null 2>&1 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wireless/finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/netcfg 3 | exec /usr/bin/netcfg-wpa_actiond stop $WIRELESS_INTERFACE 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/sshd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/bin/ssh-keygen -A # Will generate host keys if they don't already exist 4 | exec /usr/bin/sshd -D 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wired/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/netcfg 3 | exec /usr/bin/ifplugd -i $WIRED_INTERFACE -r /etc/ifplugd/netcfg.action -fIns 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.mountd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | . /etc/conf.d/nfs-common.conf 3 | sv check nfsd >/dev/null 4 | exec /usr/bin/rpc.mountd -F $MOUNTD_OPTS 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.statd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | . /etc/conf.d/nfs-common.conf 3 | sv check rpcbind >/dev/null 4 | exec /usr/bin/rpc.statd -F $STATD_OPTS 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/agetty-generic/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tty=${PWD##*-} 3 | exec setsid /sbin/agetty -8 -s 38400 $([ $tty = tty1 ] && echo --noclear) $tty linux 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.gssd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | . /etc/conf.d/nfs-common.conf 3 | sv check rpcbind >/dev/null 4 | exec /usr/bin/rpc.gssd -f $GSSD_OPTS 2>&1 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.idmapd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/nfs-common.conf 3 | sv check nfsd >/dev/null 4 | exec /usr/bin/rpc.idmapd -f $IDMAPD_OPTS 2>&1 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/mdadm/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --syslog makes it run in every case, yet forwards to mail address if given. 3 | exec mdadm --monitor --scan --syslog 4 | -------------------------------------------------------------------------------- /ignite/etc/sv/net-auto-wireless/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/netcfg 3 | /usr/bin/netcfg-wpa_actiond $WIRELESS_INTERFACE 4 | exec chpst -b net-auto-wireless pause 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpc.svcgssd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | . /etc/conf.d/nfs-server.conf 3 | sv check rpcbind >/dev/null 4 | exec /usr/bin/rpc.svcgssd -f $SVCGSSD_OPTS 2>&1 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/ddclient/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [ -f /etc/conf.d/ddclient ] && . /etc/conf.d/ddclient 4 | 5 | exec /usr/sbin/ddclient -foreground -syslog ${EXTRA_ARGS} 6 | -------------------------------------------------------------------------------- /ignite/etc/sv/privoxy/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . /etc/conf.d/privoxy 3 | exec 2>&1 4 | exec chpst -u $PRIVOXY_USER:$PRIVOXY_GROUP privoxy --no-daemon $PRIVOXY_ARGS $PRIVOXY_CONF 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/rpcbind/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | mountpoint -q /var/lib/nfs/rpc_pipefs || 3 | mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs 4 | exec /usr/bin/rpcbind -f 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0-wpa/log/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | interface=${PWD%-wpa/log} 3 | interface=${interface##*/} 4 | exec logger -t wpa_supplicant-$(cat ../interface) -p daemon.notice 5 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | To the extent possible under law, Christian Neukirchen has waived 2 | all copyright and related or neighboring rights to this work. 3 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/apache/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | mkdir -p /run/httpd 3 | [ -r /usr/bin/envvars ] && . /usr/bin/envvars 4 | [ -r /etc/conf.d/apache ] && . /etc/conf.d/apache 5 | exec httpd -DNO_DETACH 2>&1 6 | -------------------------------------------------------------------------------- /ignite/etc/sv/nfsd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | . /etc/conf.d/nfs-server.conf 3 | sv check rpcbind >/dev/null 4 | /usr/bin/rpc.nfsd $NFSD_OPTS $NFSD_COUNT 5 | /usr/bin/exportfs -a 6 | exec chpst -b nfsd pause 7 | -------------------------------------------------------------------------------- /ignite/COPYING: -------------------------------------------------------------------------------- 1 | To the extent possible under law, Christian Neukirchen has waived 2 | all copyright and related or neighboring rights to this work. 3 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ 5 | -------------------------------------------------------------------------------- /ignite/etc/sv/mksv: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | SRV=${1?usage: $0 NAME} 3 | mkdir "$SRV" 4 | echo "#!/bin/sh" | install -m755 /dev/stdin "$SRV/run" 5 | ln -s /run/runit/supervise."$(echo "$SRV" | tr / -)" "$SRV/supervise" 6 | -------------------------------------------------------------------------------- /ignite/etc/sv/acpid/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | sv check syslog-ng >/dev/null # else acpid will write to console... 3 | [[ -f /etc/conf.d/acpid ]] && . /etc/conf.d/acpid 4 | exec acpid -f $ACPID_ARGS >/dev/null 2>&1 5 | -------------------------------------------------------------------------------- /ignite/etc/runit/ctrlaltdel: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | PATH=/bin:/usr/bin 4 | 5 | # echo 'disabled.' ; exit 6 | touch /etc/runit/stopit 7 | chmod 100 /etc/runit/stopit && echo System is going down now... | wall 8 | sleep 5 9 | -------------------------------------------------------------------------------- /ignite/etc/sv/laptop-mode/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | mkdir -p /var/run/laptop-mode-tools 4 | touch /var/run/laptop-mode-tools/enabled 5 | /usr/sbin/laptop_mode auto >/dev/null 2>&1 6 | exec chpst -b laptop-mode pause 7 | -------------------------------------------------------------------------------- /ignite/etc/sv/autofs/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs 3 | [ -n "$TIMEOUT" ] && daemonoptions="--timeout=$TIMEOUT $daemonoptions" 4 | exec /usr/sbin/automount -f $daemonoptions >/dev/null 2>&1 5 | -------------------------------------------------------------------------------- /ignite/util/Makefile: -------------------------------------------------------------------------------- 1 | CC=musl-gcc 2 | CFLAGS=-Wall -static -Os -fno-asynchronous-unwind-tables -fno-stack-protector -Wl,-z -Wl,noexecstack -idirafter /usr/include 3 | 4 | all: pause halt 5 | 6 | clean: 7 | rm -f pause halt 8 | 9 | -------------------------------------------------------------------------------- /ignite/etc/sv/wlan0-wpa/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | interface=${PWD%-wpa} 3 | interface=${interface##*/} 4 | rm -f /run/wpa_supplicant/$interface 5 | exec wpa_supplicant -i $interface -D nl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf 2>&1 6 | -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | [ -f /etc/sysconfig/shorewall ] && . /etc/sysconfig/shorewall 4 | [ -f /etc/default/shorewall ] && . /etc/default/shorewall 5 | /usr/sbin/shorewall -f start >/dev/null 2>&1 6 | exec chpst -b shorewall pause 7 | -------------------------------------------------------------------------------- /ignite/etc/sv/shorewall6/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | [ -f /etc/sysconfig/shorewall6 ] && . /etc/sysconfig/shorewall6 4 | [ -f /etc/default/shorewall6 ] && . /etc/default/shorewall6 5 | /usr/sbin/shorewall6 -f start >/dev/null 2>&1 6 | exec chpst -b shorewall6 pause 7 | -------------------------------------------------------------------------------- /ignite/util/runlevel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # runlevel - runlevel(1) lookalike for runit 3 | 4 | prev=$(readlink /run/runit/runsvdir/previous || echo N) 5 | level=$(readlink /run/runit/runsvdir/current || echo unknown) 6 | echo ${prev#/run/runit/runsvdir/} ${level#/run/runit/runsvdir/} 7 | -------------------------------------------------------------------------------- /ignite/util/pause.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static void 5 | nop(int sig) 6 | { 7 | } 8 | 9 | int 10 | main() 11 | { 12 | signal(SIGTERM, nop); 13 | signal(SIGINT, nop); 14 | signal(SIGHUP, SIG_IGN); 15 | 16 | pause(); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /ignite/rc.conf.example: -------------------------------------------------------------------------------- 1 | # /etc/rc.conf - configuration file for initscripts/ignite 2 | 3 | HARDWARECLOCK="UTC" 4 | TIMEZONE="Europe/Berlin" 5 | KEYMAP="us" 6 | CONSOLEFONT= 7 | CONSOLEMAP= 8 | 9 | MODULES=() 10 | USEDMRAID="no" 11 | USEBTRFS="no" 12 | USELVM="no" 13 | 14 | HOSTNAME="localhost" 15 | 16 | DAEMONS=(agetty-tty{1,2,3,4,5,6} syslog-ng eth0 crond ntpd sshd) 17 | -------------------------------------------------------------------------------- /ignite/etc/sv/postfix/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | daemon_directory=/usr/lib/postfix \ 4 | data_directory=/var/lib/postfix \ 5 | command_directory=/usr/sbin \ 6 | config_directory=/etc/postfix \ 7 | queue_directory=/var/spool/postfix \ 8 | mail_owner=postfix \ 9 | setgid_group=postdrop \ 10 | /usr/lib/postfix/postfix-script check || exit 1 11 | 12 | exec /usr/lib/postfix/master -d 13 | -------------------------------------------------------------------------------- /ignite/etc/sv/aiccu/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Ensure aiccu isn't restarted if it exits (could cause lock-out). 4 | sv once . 5 | 6 | # Ensure aiccu isn't configured to run daemonized. 7 | if ! grep -qE "^daemonize\s+false" /etc/aiccu.conf; then 8 | echo "Error: aiccu must not run daemonized to be controlled by runit (see 'daemonize' in aiccu.conf)." 9 | exit 1 10 | fi 11 | 12 | exec aiccu start 2>&1 13 | -------------------------------------------------------------------------------- /ignite/etc/sv/hdapsd/run: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | [ -f /etc/conf.d/hdapsd ] && . /etc/conf.d/hdapsd 3 | HDAPSD_OPTS="-l" 4 | if [ -z "$DEVICE" ]; then 5 | HDAPSD_OPTS="$HDAPSD_OPTS -d sda" 6 | else 7 | for i in $DEVICE[@]; do 8 | HDAPSD_OPTS="$HDAPSD_OPTS -d $i" 9 | done 10 | fi 11 | [ ! -z "$SENSITIVITY" ] && HDAPSD_OPTS="$HDAPSD_OPTS -s $SENSITIVITY" 12 | [ "$ADAPTIVE" = "yes" ] && HDAPSD_OPTS="$HDAPSD_OPTS -a" 13 | [ "$FORCE" = "yes" ] && HDAPSD_OPTS="$HDAPSD_OPTS -f" 14 | exec /usr/sbin/hdapsd $HDAPSD_OPTS 15 | -------------------------------------------------------------------------------- /ignite/ignite.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | post_upgrade 3 | echo "ignite is installed, restart with /sbin/init.sysv 6 if you booted with sysvinit." 4 | } 5 | 6 | post_upgrade() { 7 | if [ ! -L /sbin/init ];then 8 | echo "Moving /sbin/init to /sbin/init.sysv" 9 | mv /sbin/init /sbin/init.sysv 10 | fi 11 | echo "Linking /sbin/init to runit-init" 12 | ln -sf runit-init /sbin/init 13 | } 14 | 15 | post_remove() { 16 | [ -L /sbin/init ] && [ -f /sbin/init.sysv ] && rm /sbin/init && mv /sbin/init.sysv /sbin/init 17 | } 18 | -------------------------------------------------------------------------------- /ignite-git/ignite.install: -------------------------------------------------------------------------------- 1 | post_install() { 2 | post_upgrade 3 | echo "ignite is installed, restart with /sbin/init.sysv 6 if you booted with sysvinit." 4 | } 5 | 6 | post_upgrade() { 7 | if [ ! -L /sbin/init ];then 8 | echo "Moving /sbin/init to /sbin/init.sysv" 9 | mv /sbin/init /sbin/init.sysv 10 | fi 11 | echo "Linking /sbin/init to runit-init" 12 | ln -sf runit-init /sbin/init 13 | } 14 | 15 | post_remove() { 16 | [ -L /sbin/init ] && [ -f /sbin/init.sysv ] && rm /sbin/init && mv /sbin/init.sysv /sbin/init 17 | } 18 | -------------------------------------------------------------------------------- /ignite/util/modules-load: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # modules-load [-n] [-v] - modules-load.d(5) compatible kernel module loader 3 | 4 | { 5 | # Parameters passed as modules-load= or rd.modules-load= in kernel command line. 6 | sed -nr 's/,/\n/;s/(.* |^)(rd\.)?modules-load=([^ ]*).*/\3/p' /proc/cmdline 7 | 8 | # Find files /{etc,run,usr/lib}/modules-load.d/*.conf in that order. 9 | find -L /etc/modules-load.d /run/modules-load.d /usr/lib/modules-load.d \ 10 | -maxdepth 1 -name '*.conf' -printf '%p %P\n' 2>/dev/null | 11 | # Load each basename only once. 12 | sort -k2 -s | uniq -f1 | cut -d' ' -f1 | 13 | # Read the files, output all non-empty, non-comment lines. 14 | xargs -r -d'\n' grep -h -v -e '^[#;]' -e '^$' 15 | } | 16 | # Call modprobe on the list of modules 17 | xargs -r -d'\n' modprobe -ab "$@" 18 | -------------------------------------------------------------------------------- /ignite/util/pause.1: -------------------------------------------------------------------------------- 1 | .Dd September 27, 2012 2 | .Dt PAUSE 1 3 | .Os Linux 4 | .Sh NAME 5 | .Nm pause 6 | .Nd don't exit, efficiently 7 | .Sh SYNOPSIS 8 | .Nm pause 9 | .Sh DESCRIPTION 10 | .Nm pause 11 | waits to be terminated by a signal. 12 | It can be used when service supervision is used but there is no 13 | long-running program to supervise. 14 | .Nm pause 15 | uses minimal system resources. 16 | .Sh EXAMPLES 17 | Setting up a static IP address with 18 | .Xr plugsv 8 . 19 | .Pp 20 | .Pa /etc/netsv/eth0/run : 21 | .Bd -literal -offset indent 22 | #!/bin/sh 23 | ip link set eth0 up 24 | ip addr add 192.0.2.1/24 dev eth0 25 | exec pause 26 | .Ed 27 | .Pp 28 | .Pa /etc/netsv/eth0/finish : 29 | .Bd -literal -offset indent 30 | #!/bin/sh 31 | ip addr del 192.0.2.1/24 dev eth0 32 | ip link set eth0 down 33 | .Ed 34 | .Sh SEE ALSO 35 | .Xr sleep 1 , 36 | .Xr pause 3 37 | .Sh AUTHOR 38 | .An Christian Neukirchen , 39 | .Mt chneukirchen@gmail.com . 40 | -------------------------------------------------------------------------------- /runit-musl/_sv: -------------------------------------------------------------------------------- 1 | #compdef sv 2 | 3 | # completion for runit sv(1) 4 | # Christian Neukirchen 5 | # runit 2.1.1, services in /var/service are completed by default 6 | 7 | local ret=1 services 8 | 9 | _arguments \ 10 | '-v[verbose]' \ 11 | '-w[wait]:seconds' \ 12 | '1: :->cmds' \ 13 | '*:: :->args' && ret=0 14 | 15 | case $state in 16 | cmds) 17 | _values "sv command" \ 18 | status \ 19 | up \ 20 | down \ 21 | once \ 22 | pause cont hup alarm interrupt quit 1 2 term kill \ 23 | exit 24 | # above allow one-character shortcuts, complete these 25 | [[ $words[CURRENT] = [sudopchaiq12tke] ]] || 26 | _values "sv command" \ 27 | start \ 28 | stop \ 29 | restart \ 30 | shutdown \ 31 | force-stop \ 32 | force-reload \ 33 | force-restart \ 34 | force-shutdown \ 35 | check 36 | ret=0;; 37 | args) 38 | services=( /var/service/*(-/N:t) ) 39 | (( $#services )) && _values services $services && ret=0 40 | [[ $words[CURRENT] = */* ]] && _directories && ret=0 41 | ;; 42 | esac 43 | 44 | return $ret 45 | -------------------------------------------------------------------------------- /ignite/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Christian Neukirchen 2 | pkgname=ignite 3 | pkgver=0.9.0 4 | pkgrel=3 5 | pkgdesc="A replacement for sysvinit based upon runit" 6 | url="https://github.com/chneukirchen/ignite" 7 | license=('custom') 8 | arch=('i686' 'x86_64' 'arm') 9 | depends=('bash' 'util-linux' 'procps-ng' 'runit-musl' 'sysvinit-tools') 10 | makedepends=('gcc' 'make' 'coreutils' 'sed' 'musl') 11 | conflicts=('ignite-git') 12 | install=ignite.install 13 | source=(http://chneukirchen.org/releases/$pkgname-$pkgver.tar.gz) 14 | sha256sums=('f6757e125936f10fcc8c689abc15842cac5b3bd3bc36c93a4232fc0b07a9d365') 15 | 16 | # /etc/sv gets added below to this! 17 | backup=('etc/runit/1' 18 | 'etc/runit/2' 19 | 'etc/runit/3' 20 | 'etc/runit/ctrlaltdel') 21 | 22 | build() { 23 | cd "$srcdir/$pkgname-$pkgver/util" 24 | make 25 | } 26 | 27 | package() { 28 | cd "$srcdir/$pkgname-$pkgver" 29 | 30 | backup+=(etc/sv/*/run) 31 | backup+=(etc/sv/*/finish) 32 | 33 | cp -r etc $pkgdir/ 34 | chmod -R u=rwX,g=rX,o=rX $pkgdir/etc 35 | 36 | install -D -m0755 util/pause $pkgdir/usr/bin/pause 37 | install -D -m0644 util/pause.1 $pkgdir/usr/share/man/man1/pause.1 38 | 39 | install -D -m0755 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING 40 | } 41 | -------------------------------------------------------------------------------- /ignite/etc/runit/3: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 3 | 4 | exec 2> >(sed 's/^/:: /') 5 | set -v 6 | 7 | . /etc/rc.conf 8 | 9 | echo 'Waiting for services to stop...' 10 | sv -w196 force-stop /var/service/* 11 | sv exit /var/service/* 12 | 13 | stty onlcr 14 | echo Shutdown... 15 | 16 | runlevel=$(readlink -f /etc/runit/runsvdir/current) 17 | runlevel=${runlevel#/run/service.} 18 | [[ $runlevel = /run/service ]] && ref="DAEMONS[@]" || ref="DAEMONS_${runlevel}[@]" 19 | 20 | [ -x /etc/rc.local.shutdown ] && /etc/rc.local.shutdown 21 | 22 | dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 &>/dev/null 23 | 24 | hwclock --systohc ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z)} 25 | 26 | halt -w # for utmp 27 | 28 | [[ $USELVM = yes ]] && vgchange --monitor n 29 | 30 | udevadm control --exit 31 | 32 | pkill --inverse -s0,1 -TERM 33 | sleep 5 34 | pkill --inverse -s0,1 -KILL 35 | 36 | umount /tmp 37 | swapoff -a 38 | umount -r -a -t nosysfs,noproc,nodevtmpfs,notmpfs 39 | 40 | [[ $USELVM = yes ]] && vgchange --sysinit -a n 41 | awk '/^#/ || /^$/ { next } 42 | NF>2 { print "ignite unsupported crypttab: " $0 >"/dev/stderr"; next } 43 | { system("cryptsetup luksClose " $1) }' /dev/stderr; exit 1;; 13 | t) ;; 14 | 15 | f) touch /fastboot;; 16 | F) touch /forcefsck;; 17 | 18 | k) action=true;; 19 | c) action=cancel;; 20 | h|P) action=halt;; 21 | r) action=reboot;; 22 | 23 | [?]) echo "Usage: shutdown [-fF] [-kchPr] time [warning message]" >/dev/stderr; exit 1;; 24 | esac 25 | done 26 | shift $(expr $OPTIND - 1) 27 | 28 | time=$1; shift 29 | message="${*:-system is going down}" 30 | 31 | if [ "$action" = "cancel" ]; then 32 | kill $(cat /run/runit/shutdown.pid) 33 | echo "${*:-shutdown cancelled}" | wall 34 | exit 35 | fi 36 | 37 | echo $$ >/run/runit/shutdown.pid 38 | 39 | case "$time" in 40 | now) time=0;; 41 | +*) time=${time#+};; 42 | *:*) echo "absolute time is not implemented" >/dev/stderr; exit 1;; 43 | *) echo "invalid time"; exit 1;; 44 | esac 45 | 46 | if [ "$time" -gt 5 ]; then 47 | echo "$message in $time minutes" | wall 48 | echo -n "shutdown: sleeping for $time minutes... " 49 | sleep $(expr '(' "$time" - 5 ')' '*' 60) 50 | echo 51 | time=5 52 | fi 53 | 54 | if [ "$time" -gt 0 ]; then 55 | echo "$message in $time minutes" | wall 56 | touch /etc/nologin 57 | echo -n "shutdown: sleeping for $time minutes... " 58 | sleep $(expr "$time" '*' 60) 59 | echo 60 | rm /etc/nologin 61 | fi 62 | 63 | echo "$message NOW" | wall 64 | 65 | $action 66 | -------------------------------------------------------------------------------- /ignite/util/zzz: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # zzz - really simple suspend script 3 | 4 | USAGE="Usage: ${0##*/} [-nSzZR] 5 | -n dry run (sleep for 5s instead of suspend/hibernate) 6 | -S Low-power idle (ACPI S0) 7 | -z suspend to RAM (ACPI S3) [DEFAULT for zzz(8)] 8 | -Z hibernate to disk & power off (ACPI S4) [DEFAULT for ZZZ(8)] 9 | -R hibernate to disk & reboot" 10 | 11 | fail() { echo ${0##*/}: 1>&2 "$*"; exit 1; } 12 | 13 | export ZZZ_MODE=suspend 14 | export ZZZ_HIBERNATE_MODE=platform 15 | 16 | case "$0" in 17 | *ZZZ) ZZZ_MODE=hibernate;; 18 | esac 19 | 20 | while getopts hnSzRZ: opt; do 21 | case "$opt" in 22 | n) ZZZ_MODE=noop;; 23 | S) ZZZ_MODE=standby;; 24 | z) ZZZ_MODE=suspend;; 25 | Z) ZZZ_MODE=hibernate;; 26 | R) ZZZ_MODE=hibernate; ZZZ_HIBERNATE_MODE=reboot;; 27 | [h?]) fail "$USAGE";; 28 | esac 29 | done 30 | shift $((OPTIND-1)) 31 | 32 | case "$ZZZ_MODE" in 33 | suspend) grep -q mem /sys/power/state || fail "suspend not supported";; 34 | hibernate) grep -q disk /sys/power/state || fail "hibernate not supported";; 35 | esac 36 | 37 | test -w /sys/power/state || fail "sleep permission denied" 38 | 39 | ( 40 | flock -n 9 || fail "another instance of zzz is running" 41 | 42 | echo -n "Zzzz... " 43 | 44 | for hook in /etc/zzz.d/suspend/*; do 45 | [ -x "$hook" ] && "$hook" 46 | done 47 | 48 | case "$ZZZ_MODE" in 49 | standby) echo -n freeze >/sys/power/state || fail "standby failed";; 50 | suspend) echo -n mem >/sys/power/state || fail "suspend failed";; 51 | hibernate) 52 | echo $ZZZ_HIBERNATE_MODE >/sys/power/disk 53 | echo -n disk >/sys/power/state || fail "hibernate failed";; 54 | noop) sleep 5;; 55 | esac 56 | 57 | for hook in /etc/zzz.d/resume/*; do 58 | [ -x "$hook" ] && "$hook" 59 | done 60 | 61 | echo "yawn." 62 | ) 9 2 | pkgname=ignite-git 3 | pkgver=20140131 4 | pkgrel=1 5 | pkgdesc="A replacement for sysvinit based upon runit, Git HEAD version" 6 | url="https://github.com/chneukirchen/ignite" 7 | license=('custom') 8 | arch=('i686' 'x86_64' 'arm') 9 | depends=('bash' 'util-linux' 'procps-ng' 'runit-musl') 10 | makedepends=('gcc' 'make' 'coreutils' 'sed' 'git' 'musl') 11 | provides=('ignite') 12 | conflicts=('ignite' 'sysvinit') 13 | install=ignite.install 14 | source=('git+https://github.com/chneukirchen/ignite.git') 15 | md5sums=('SKIP') 16 | 17 | # /etc/sv gets added below to this! 18 | backup=('etc/runit/1' 19 | 'etc/runit/2' 20 | 'etc/runit/3' 21 | 'etc/runit/ctrlaltdel') 22 | 23 | pkgver() { 24 | cd "$srcdir/ignite" 25 | git log -1 --format="%cd" --date=short | sed 's|-||g' 26 | } 27 | 28 | build() { 29 | cd "$srcdir/ignite/ignite/util" 30 | make 31 | } 32 | 33 | package() { 34 | cd "$srcdir/ignite/ignite" 35 | 36 | backup+=(etc/sv/*/run) 37 | backup+=(etc/sv/*/finish) 38 | 39 | cp -r etc $pkgdir/ 40 | chmod -R u=rwX,g=rX,o=rX $pkgdir/etc 41 | 42 | install -D -m0755 util/pause $pkgdir/usr/bin/pause 43 | install -D -m0644 util/pause.1 $pkgdir/usr/share/man/man1/pause.1 44 | 45 | install -D -m0755 util/halt $pkgdir/usr/bin/halt 46 | install -D -m0755 util/poweroff $pkgdir/usr/bin/poweroff 47 | install -D -m0755 util/reboot $pkgdir/usr/bin/reboot 48 | install -D -m0755 util/shutdown.sh $pkgdir/usr/bin/shutdown 49 | install -D -m0755 util/runlevel.sh $pkgdir/usr/bin/runlevel 50 | 51 | install -D -m0644 ../COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING 52 | install -D -m0644 ../README $pkgdir/usr/share/doc/$pkgname/README 53 | install -D -m0644 rc.conf.example $pkgdir/usr/share/doc/$pkgname/rc.conf.example 54 | } 55 | -------------------------------------------------------------------------------- /ignite/util/halt.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | extern char *__progname; 8 | 9 | typedef enum {NOOP, HALT, REBOOT, POWEROFF} action_t; 10 | 11 | int main(int argc, char *argv[]) { 12 | int do_sync = 1; 13 | int do_force = 0; 14 | int opt; 15 | action_t action = NOOP; 16 | 17 | if (strcmp(__progname, "halt") == 0) 18 | action = HALT; 19 | else if (strcmp(__progname, "reboot") == 0) 20 | action = REBOOT; 21 | else if (strcmp(__progname, "poweroff") == 0) 22 | action = POWEROFF; 23 | else 24 | warnx("no default behavior, needs to be called as halt/reboot/poweroff."); 25 | 26 | while ((opt = getopt(argc, argv, "dfhinw")) != -1) 27 | switch (opt) { 28 | case 'n': 29 | do_sync = 0; 30 | break; 31 | case 'w': 32 | action = NOOP; 33 | break; 34 | case 'd': 35 | case 'h': 36 | case 'i': 37 | /* silently ignored. */ 38 | break; 39 | case 'f': 40 | do_force = 1; 41 | break; 42 | default: 43 | errx(1, "Usage: %s [-n] [-f]", __progname); 44 | } 45 | 46 | if (do_sync) 47 | sync(); 48 | 49 | switch (action) { 50 | case HALT: 51 | if (do_force) 52 | reboot(RB_HALT_SYSTEM); 53 | else 54 | execl("/sbin/init", "init", "0", (char*)0); 55 | err(1, "halt failed"); 56 | break; 57 | case POWEROFF: 58 | if (do_force) 59 | reboot(RB_POWER_OFF); 60 | else 61 | execl("/sbin/init", "init", "0", (char*)0); 62 | err(1, "poweroff failed"); 63 | break; 64 | case REBOOT: 65 | if (do_force) 66 | reboot(RB_AUTOBOOT); 67 | else 68 | execl("/sbin/init", "init", "6", (char*)0); 69 | err(1, "reboot failed"); 70 | break; 71 | case NOOP: 72 | break; 73 | } 74 | 75 | return 0; 76 | } 77 | -------------------------------------------------------------------------------- /ignite/util/shutdown.8: -------------------------------------------------------------------------------- 1 | .Dd July 29, 2014 2 | .Dt SHUTDOWN 8 3 | .Os Linux 4 | .Sh NAME 5 | .Nm shutdown 6 | .Nd bring down the system 7 | .Sh SYNOPSIS 8 | .Nm shutdown 9 | .Op Fl rhP 10 | .Op Fl fF 11 | .Op Cm now | Cm + Ns Ar mins 12 | .Op Ar message... 13 | .Sh DESCRIPTION 14 | .Nm 15 | brings the system down in a secure way. 16 | All logged-in users 17 | are notified that the system is going down, and 18 | .Xr login 1 19 | is blocked. 20 | .Pp 21 | By default, 22 | .Nm 23 | puts the system into single user mode. Rebooting and halting the 24 | system can be done using the following options: 25 | .Bl -tag -width indent 26 | .It Fl c 27 | Cancel an ongoing shutdown. 28 | .It Fl f 29 | Enable fast booting; skip 30 | .Xr fsck 8 31 | on next boot. 32 | .It Fl F 33 | Force run of 34 | .Xr fsck 8 35 | on next boot. 36 | .It Fl h 37 | Halt the system. 38 | .It Fl k 39 | Don't really shutdown; only send the warning messages to everybody. 40 | .It Fl P 41 | Poweroff the system. 42 | .It Fl r 43 | Reboot the system. 44 | .It Cm now 45 | Shutdown without further waiting. 46 | .It Cm + Ns Ar mins 47 | Wait 48 | .Ar mins 49 | minutes before shutting down. 50 | .It Ar message 51 | Message displayed to all users, defaults to "system is going down". 52 | .El 53 | .Sh UNSUPPORTED OPTIONS 54 | This version of 55 | .Nm 56 | is based on 57 | .Xr runit 8 , 58 | the following features are 59 | .Sy not 60 | supported: 61 | .Bl -tag -width indent 62 | .It Fl t Ar secs 63 | to wait 64 | .Ar secs 65 | seconds between SIGKILL and SIGTERM on shutdown is silently ignored. 66 | .It Fl a 67 | Use 68 | .Pa /etc/shutdown.allow . 69 | .It Fl H 70 | Drop into boot monitor. 71 | .It Fl n 72 | Don't call 73 | .Xr init 8 . 74 | .It Ar hh Ns : Ns Ar mm 75 | Absolute time specification is not implemented. 76 | .El 77 | .Sh EXAMPLES 78 | Turn off the system: 79 | .Dl # shutdown -h now 80 | .Sh SEE ALSO 81 | .Xr fsck 8 , 82 | .Xr init 8 , 83 | .Xr runit 8 , 84 | .Xr runsvchdir 8 , 85 | .Xr halt 8 , 86 | .Xr poweroff 8 , 87 | .Xr reboot 8 88 | .Sh AUTHOR 89 | .An Christian Neukirchen , 90 | .Mt chneukirchen@gmail.com . 91 | -------------------------------------------------------------------------------- /runit-musl/PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: Christian Neukirchen 2 | # Contributor: TJ Vanderpoel 3 | # Contributor: Kevin Berry 4 | # Contributor: Andrej Gelenberg 5 | pkgname=runit-musl 6 | _pkgname=runit 7 | pkgver=2.1.2 8 | pkgrel=1 9 | pkgdesc="A service supervision scheme, compiled with musl" 10 | url="http://smarden.org/runit/" 11 | license=('custom') 12 | arch=('i686' 'x86_64') 13 | depends=('bash' 'util-linux') 14 | provides=("runit" "runit-dietlibc") 15 | conflicts=("runit" "runit-dietlibc") 16 | makedepends=('gcc' 'make' 'coreutils' 'sed' 'musl') 17 | 18 | source=( http://smarden.org/runit/runit-$pkgver.tar.gz _sv ) 19 | sha256sums=('6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18' 20 | 'c8f08a977595d16b8afd12e49048c061c483e4408bfa6f66e72af4a72d279e3d') 21 | 22 | build() { 23 | cd $srcdir/admin/$_pkgname-$pkgver/src 24 | 25 | echo "musl-gcc -D_GNU_SOURCE $CFLAGS" >conf-cc 26 | echo "musl-gcc -static -s $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld 27 | # set default service path to /var/service 28 | sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c 29 | 30 | make 31 | } 32 | 33 | check() { 34 | cd $srcdir/admin/$_pkgname-$pkgver/src 35 | 36 | make check 37 | } 38 | 39 | package() { 40 | cd $srcdir/admin/$_pkgname-$pkgver/src 41 | 42 | # default services 43 | install -d -m0755 "$pkgdir/var" 44 | ln -s ../run/runit/runsvdir/current "${pkgdir}/var/service" || return 1 45 | 46 | install -d -m0755 "$pkgdir/usr/bin" 47 | install -s -m0755 $srcdir/admin/$_pkgname-$pkgver/src/{chpst,runit,runit-init,runsv,runsvchdir,runsvdir,sv,svlogd,utmpset} $pkgdir/usr/bin 48 | 49 | install -d -m0755 $pkgdir/usr/share/man/man8 50 | install -m0644 $srcdir/admin/$_pkgname-$pkgver/man/* $pkgdir/usr/share/man/man8 51 | 52 | install -d -m0755 $pkgdir/usr/share/doc/runit 53 | install -m0644 $srcdir/admin/$_pkgname-$pkgver/doc/*.html $pkgdir/usr/share/doc/runit 54 | 55 | install -D $srcdir/admin/$_pkgname-$pkgver/package/COPYING $pkgdir/usr/share/licenses/runit-musl/COPYING 56 | 57 | install -D -m0644 $srcdir/_sv $pkgdir/usr/share/zsh/site-functions/_sv 58 | } 59 | -------------------------------------------------------------------------------- /ignite/util/zzz.8: -------------------------------------------------------------------------------- 1 | .Dd July 25, 2014 2 | .Dt ZZZ 8 3 | .Os Linux 4 | .Sh NAME 5 | .Nm zzz , 6 | .Nm ZZZ 7 | .Nd suspend or hibernate your computer 8 | .Sh SYNOPSIS 9 | .Nm zzz 10 | .Op Fl nSzZR 11 | .Nm ZZZ 12 | .Op Fl nSzZR 13 | .Sh DESCRIPTION 14 | .Nm 15 | is a simple script to suspend or hibernate your computer. 16 | It supports hooks before and after suspending. 17 | .Bl -tag -width indent 18 | .It Fl n 19 | dry-run mode. Instead of performing an ACPI action, 20 | .Nm 21 | will just sleep for a few seconds. 22 | .It Fl S 23 | Enter low-power idle mode (ACPI S0, kernel name "freeze"). 24 | .It Fl z 25 | Enter suspend to RAM mode (ACPI S3, kernel name "mem"). 26 | This is the default for 27 | .Nm zzz . 28 | .It Fl Z 29 | Enter hibernate to disk mode (ACPI S4, kernel name "disk") and power off. 30 | This is the default for 31 | .Nm ZZZ . 32 | .It Fl R 33 | Enter hibernate to disk mode and reboot. This can be used to switch 34 | operating systems. 35 | .El 36 | .Sh FILES 37 | Before suspending, 38 | .Nm zzz 39 | runs the executable files in 40 | .Pa /etc/zzz.d/suspend 41 | in alphanumeric order. 42 | After suspending, 43 | .Nm zzz 44 | runs the executable files in 45 | .Pa /etc/zzz.d/resume 46 | in alphanumeric order (not in reverse order!). 47 | .Pp 48 | The environment variable 49 | .Ev ZZZ_MODE 50 | can be used in these hooks to differentiate between 51 | .Ic standby , 52 | .Ic suspend , 53 | and 54 | .Ic resume . 55 | .Sh DIAGNOSTICS 56 | .Bl -tag -width indent 57 | .It suspend/hibernate not supported 58 | The hardware does not support ACPI S3/S4 with this kernel. 59 | .It sleep permission denied 60 | You lack sufficent privilege to write to 61 | .Pa /sys/power/state . 62 | .It another instance of zzz is running 63 | .Nm 64 | locks 65 | .Pa /sys/power 66 | during operation. Perhaps a hook is stuck? 67 | .It Zzzz... yawn. 68 | The system has woken up again. Everything is fine. 69 | You feel refreshed. 70 | .Sh SEE ALSO 71 | .Xr s2ram 8 , 72 | .Xr s2disk 8 , 73 | .Xr pm-action 8 , 74 | OpenBSD's 75 | .Xr apm 8 76 | .Sh HISTORY 77 | A similar 78 | .Nm apm 79 | command appeared in 80 | .Nx 1.3 81 | and 82 | .Ox 1.2 . 83 | .Sh AUTHOR 84 | .An Christian Neukirchen , 85 | .Mt chneukirchen@gmail.com . 86 | .Sh LICENSE 87 | .Nm 88 | is in the public domain. 89 | -------------------------------------------------------------------------------- /ignite/etc/runit/1: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 3 | 4 | # re-exec this script with a controlling tty 5 | if [ $(tty) = /dev/console ]; then 6 | mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev 7 | tty=$($tty 2>&1" 10 | fi 11 | klog() { while IFS= read -r line; do echo "<7>$1 $line" >/dev/kmsg; echo "$1 $line"; done; } 12 | exec 2> >(klog '::') 13 | exec > >(klog '>>') 14 | set -v 15 | 16 | trap : INT TSTP QUIT 17 | trap 'exec >$(tty); sulogin -p <>$(tty) 2>&1' ERR 18 | 19 | echo -e '\nArch Linux\nhttp://www.archlinux.org\n' 20 | 21 | . /etc/rc.conf 22 | 23 | mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev 24 | mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev 25 | mountpoint -q /run || mount -t tmpfs run /run -o mode=0755,nosuid,nodev 26 | mountpoint -q /dev || mount -t devtmpfs dev /dev -o mode=0755,nosuid 27 | 28 | mkdir -p -m0755 /run/runit /run/lock /run/lock/lvm /run/lvm /run/user /dev/pts /dev/shm 29 | mountpoint -q /dev/pts || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec 30 | mountpoint -q /dev/shm || mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev 31 | 32 | mount -o remount,ro / 33 | 34 | for i in /dev/tty[0-9]*;do 35 | unicode_start <$i 36 | [[ $CONSOLEFONT ]] && setfont ${CONSOLEMAP:+-m $CONSOLEMAP} $CONSOLEFONT -C $i 37 | done & 38 | 39 | loadkeys -q ${KEYMAP:-us} 40 | 41 | TZ=$TIMEZONE hwclock --systz \ 42 | ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z) --noadjfile} 43 | 44 | /usr/lib/systemd/systemd-udevd --daemon 45 | udevadm trigger --action=add --type=subsystems 46 | udevadm trigger --action=add --type=devices 47 | modprobe -ab "" "${MODULES[@]}" || true 48 | udevadm settle 49 | 50 | ip link set up dev lo 51 | { [[ -s /etc/hostname ]] && cat /etc/hostname || echo $HOSTNAME ;} >/proc/sys/kernel/hostname 52 | 53 | [[ $USEDMRAID = yes ]] && dmraid -i -ay 54 | [[ $USEBTRFS = yes ]] && btrfs device scan 55 | [[ $USELVM = yes ]] && vgchange --sysinit -a y 56 | awk '/^#/ || /^$/ { next } 57 | NF>2 { print "ignite unsupported crypttab: " $0 >"/dev/stderr"; next } 58 | { system("cryptsetup luksOpen " $2 " " $1) }' /etc/crypttab 59 | [[ $USELVM = yes ]] && vgchange --sysinit -a y 60 | 61 | [[ -f /forcefsck || " $(/dev/null || true 79 | ( umask 077; dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=512 &>/dev/null ) 80 | 81 | install -m0664 -o root -g utmp /dev/null /run/utmp 82 | rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot 83 | 84 | dmesg >/var/log/dmesg.log 85 | 86 | install -m0 /dev/null /run/runit/stopit 87 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | = Ignite, a simple and robust init replacement 2 | 3 | ignite is a set of scripts to boot Arch Linux using runit for service 4 | supervision. 5 | 6 | == Benefits 7 | 8 | Robust, proven software: ignite is based on runit (which has been in 9 | development since 2001), a high quality implementation of ideas dating 10 | back to 1997 and earlier. 11 | 12 | Simple configuration: ignite allows you to configure Arch using 13 | /etc/rc.conf, like back in the old days. 14 | 15 | Low overhead: runit-run is a tiny, statically linked binary that only 16 | does the absolutely essential things. 17 | 18 | Non-intrusive: ignite wont replace your cron, getty or syslog-ng. You 19 | are still free to do that yourself, if you want to. 20 | 21 | Portability: the scripts can be easily adapted to other Linux 22 | distribution, or even other unixish operating systems. 23 | 24 | Full control: ignite will never start anything you didn't tell it 25 | about. ignite also supports read-only root file systems. 26 | 27 | == Setup 28 | 29 | READ THIS CAREFULLY OR YOUR SYSTEM WILL NOT BOOT SUCCESSFULLY. 30 | 31 | If you booted with sysvinit, make a copy of /usr/bin/init to 32 | /usr/bin/init.sysv, else you cannot reboot cleanly. 33 | 34 | Install runit-musl and ignite-git from AUR. Ensure that you have at least 35 | one agetty-tty1 process in DAEMONS. Note that services mentioned in 36 | /etc/inittab will not be picked up anymore. 37 | 38 | You can reboot with "init.sysv 6" after installation if you booted 39 | with sysvinit. 40 | 41 | == Configuration 42 | 43 | ignite is configured using /etc/rc.conf and respects these variables: 44 | 45 | HARDWARECLOCK=UTC|local 46 | TIMEZONE= 47 | KEYMAP= 48 | CONSOLEFONT= 49 | CONSOLEMAP= 50 | MODULES=() # prefix ! is not supported 51 | USEDMRAID=no|yes 52 | USEBTRFS=no|yes 53 | USELVM=no|yes 54 | HOSTNAME= # or use /etc/hostname 55 | DAEMONS=(alsa syslog-ng crond) # see below, prefix ! disables 56 | 57 | DAEMONS refer to service directories in /etc/sv. 58 | 59 | Other runlevels can be defined in /etc/rc.conf as well by setting 60 | $DAEMONS_foo to an array of services. You can boot these by adding 61 | runlevel=foo to the kernel command line. There is a predefined 62 | runlevel "single" which also can be triggered by appending "single", 63 | "1", "S", or "-s" to the kernel command line. It is predefined to 64 | only start sulogin on tty1, and takes extra precaution to allow the 65 | root filesystem to be (re-)mountable read-only. The "emergency" 66 | runlevel (or "-b") can be used to get a root shell in stage 2. 67 | 68 | You can change runlevels in the running system by executing 69 | "runsvchdir $runlevel". This will shut down all services 70 | that are not in the new runlevel, and start the missing ones. 71 | Services defined in both runlevels will keep running. 72 | 73 | == Additional Arch configuration points 74 | 75 | * If you use syslog-ng, ensure that you source from 76 | 'unix-dgram("/dev/log");' in /etc/syslog-ng/syslog-ng.conf. 77 | 78 | * Restore core dumps: remove /usr/lib/sysctl.d/coredump.conf 79 | 80 | * Revert network interface renaming: 81 | ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules 82 | 83 | * For NFS server support, you need: 84 | nfsd rpcbind rpc.idmapd rpc.mountd rpc.statd 85 | (and, if desired: rpc.gssd rpc.svcgssd) 86 | 87 | * For NFS client support, you need: 88 | rpcbind rpc.statd (and, if desired: rpc.gssd) 89 | 90 | * With xorg-server 1.16.0+, you may need a file /etc/X11/Xwrapper.config 91 | with following contents (also see Xorg.wrap(1)) 92 | 93 | needs_root_rights = yes 94 | allowed_users = anybody 95 | 96 | == How it works 97 | 98 | ignite uses runit, with "1 2 3"-scripts adapted from Arch initscripts 99 | 2012.05.1, back when they were plain bash scripts. The "1 2 3"- 100 | scripts are very straight forward, you can read them easily. 101 | 102 | Phase 1 configures the system initially. It can be interrupted at 103 | almost any time by pressing C-c, which will drop you into a sulogin, 104 | so you can change stuff. Upon exiting this emergency shell, booting 105 | resumes at that step. STDOUT and STDERR are logged into dmesg. 106 | 107 | In phase 2, $DAEMONS scripts are linked to /run/runit/runsvdir/*, and 108 | runsvchdir picks them up. You can fiddle around there yourself, but 109 | changes won't be persistent. Use plain "runsv /etc/sv/$DAEMON" if you 110 | just want to try a daemon and not permanently enable it. 111 | 112 | Use shutdown/halt/reboot to enter phase 3, which stops all services, 113 | unmounts everything and lets runit turn off/reboot the machine. 114 | 115 | == Limitations 116 | 117 | - No support for non-UTF8 environments 118 | - Only simple crypttab support (no 3rd and 4th column) 119 | - Some irrelevant features of shutdown/halt/reboot are not implemented 120 | 121 | == Copyright 122 | 123 | runit is BSD licensed. 124 | 125 | ignite is in the public domain. 126 | 127 | To the extent possible under law, the creator of this work has waived 128 | all copyright and related or neighboring rights to this work. 129 | 130 | http://creativecommons.org/publicdomain/zero/1.0/ 131 | --------------------------------------------------------------------------------