"/etc/init.d/rc.local"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
(다른 사용자 한 명의 중간 판 2개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;/etc/init.d/rc.local
;/etc/init.d/rc.local
*로컬 부트 스크립트


<source lang='bash'>
<syntaxhighlight lang='bash'>
#! /bin/sh
#! /bin/sh
### BEGIN INIT INFO
### BEGIN INIT INFO
44번째 줄: 45번째 줄:
         ;;
         ;;
esac
esac
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
50번째 줄: 51번째 줄:
*[[/lib/lsb/init-functions]]
*[[/lib/lsb/init-functions]]


[[분류: Ubuntu 14]]
[[분류: /etc/init.d]]
[[분류: /etc/init.d]]

2020년 11월 2일 (월) 02:40 기준 최신판

1 개요[ | ]

/etc/init.d/rc.local
  • 로컬 부트 스크립트
#! /bin/sh
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
	if [ -x /etc/rc.local ]; then
	        [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
		/etc/rc.local
		ES=$?
		[ "$VERBOSE" != no ] && log_end_msg $ES
		return $ES
	fi
}

case "$1" in
    start)
	do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}