PageRenderTime 31ms CodeModel.GetById 28ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/rc2.d/S99rc.local

http://github.com/brinkman83/bashrc
Shell | 41 lines | 27 code | 5 blank | 9 comment | 5 complexity | 2964c1446c6453cdde4213eede97ac38 MD5 | raw file
 1#! /bin/sh
 2### BEGIN INIT INFO
 3# Provides:          rc.local
 4# Required-Start:    $remote_fs $syslog $all
 5# Required-Stop:
 6# Default-Start:     2 3 4 5
 7# Default-Stop:
 8# Short-Description: Run /etc/rc.local if it exist
 9### END INIT INFO
10
11
12PATH=/sbin:/usr/sbin:/bin:/usr/bin
13
14. /lib/init/vars.sh
15. /lib/lsb/init-functions
16
17do_start() {
18	if [ -x /etc/rc.local ]; then
19	        [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
20		/etc/rc.local
21		ES=$?
22		[ "$VERBOSE" != no ] && log_end_msg $ES
23		return $ES
24	fi
25}
26
27case "$1" in
28    start)
29	do_start
30        ;;
31    restart|reload|force-reload)
32        echo "Error: argument '$1' not supported" >&2
33        exit 3
34        ;;
35    stop)
36        ;;
37    *)
38        echo "Usage: $0 start|stop" >&2
39        exit 3
40        ;;
41esac