# rc.lib -- common functions for rc.boot and rc.shutdown out() { printf '\033[1;36m-> \033[39m%s\033[m\n' "$@" ;} err() { printf '\033[1;31m!> \033[39m%s\033[m\n' "$@" ;} shell() { error "Dropping to shell, type 'exit' to continue the boot process." sh -l } run_hook() { out "Running '$1' hooks..." for hook in "/etc/init/"*".$1"; do [ -f "$hook" ] || continue out "Running '$hook'..." . "$hook" done }