bdwmb/modules/init
Ari Archer df4a3c1dc7
update @ Sat 19 Mar 17:14:52 EET 2022
Signed-off-by: Ari Archer <ari.web.xyz@gmail.com>
2022-03-19 17:14:52 +02:00

9 lines
245 B
Bash

#!/usr/bin/env sh
# DEPENDS ON: strings, awk
binit() {
init="$(strings /sbin/init |
awk 'match($0, /(upstart|systemd|sysvinit|runit|openrc|s6|66)/) { print substr($0, RSTART, RLENGTH); exit; }')"
printf "%s" "${init:-init}"
}