From f028e9912b86c4e5663f728d4cdce2e4cdffac54 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 20 Apr 2012 20:58:23 -0400 Subject: Add inittab and boot/shutdown service run control. --- (limited to 'src/etc/init.d/rc') diff --git a/src/etc/init.d/rc b/src/etc/init.d/rc new file mode 100755 index 0000000..9caffe7 --- /dev/null +++ b/src/etc/init.d/rc @@ -0,0 +1,27 @@ +#!/bin/sh +# +# /etc/init.d/rc +# Executes init scripts on init and shutdown. +# +# Copyright (C) 2012 Patrick "P. J." McDermott +# This file may be reproduced, distributed, modified, and otherwise dealt in +# under the terms of the Expat/MIT License. + +[ -x /usr/bin/logger ] && logger='logger -s -p 6 -t sysinit' || logger=cat + +level=${0#*/rc} +case ${level} in + S) + action=start + ;; + K) + action=stop + ;; + *) + exit 1 + ;; +esac + +for i in /etc/init.d/${level}*; do + [ -x "${i}" ] && "${i}" ${action} 2>&1 +done | ${logger} -- cgit v0.9.1