⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rc

📁 This file is the compressed file of the run level script
💻
字号:
#! /bin/bash## rc            This file is responsible for starting/stopping#               services when the runlevel changes.## Original Author:       #               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>## check a file to be a correct runlevel scriptcheck_runlevel (){	# Check if the file exists at all.	[ -x "$1" ] || return 1	# Reject backup files and files generated by rpm.	case "$1" in		*.rpmsave|*.rpmorig|*.rpmnew|*~|*.orig)			return 1			;;	esac	return 0}# Now find out what the current and what the previous runlevel are.argv1="$1"set `/sbin/runlevel`runlevel=$2previous=$1export runlevel previous. /etc/init.d/functions# See if we want to be in user confirmation modeif [ "$previous" = "N" ]; then	if [ -f /var/run/confirm ] \			|| grep -i confirm /proc/cmdline >/dev/null ; then		rm -f /var/run/confirm		CONFIRM=yes		export CONFIRM		echo $"Entering interactive startup"	else		echo $"Entering non-interactive startup"	fifi# Get first argument. Set new runlevel to this argument.[ -n "$argv1" ] && runlevel="$argv1"# Is there an rc directory for this new runlevel?[ -d /etc/rc$runlevel.d ] || exit 0# First, run the KILL scripts.#@@ New codemake -j -f /etc/rc.d/runlevel.mk RUNLEVEL=$runlevel JOB=stop#::for i in /etc/rc$runlevel.d/K* ; do#::	check_runlevel "$i" || continue#::#::	# Check if the subsystem is already up.#::	subsys=${i#/etc/rc$runlevel.d/K??}#::	[ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \#::		|| continue#::#::	# Bring the subsystem down.#::	if egrep -q "(killproc |action )" $i ; then#::		$i stop#::	else#::		action $"Stopping $subsys: " $i stop#::	fi#::done# Now run the START scripts.#@@ New codemake -j -f /etc/rc.d/runlevel.mk RUNLEVEL=$runlevel JOB=start#::for i in /etc/rc$runlevel.d/S* ; do#::	check_runlevel "$i" || continue#::#::	# Check if the subsystem is already up.#::	subsys=${i#/etc/rc$runlevel.d/S??}#::	[ -f /var/lock/subsys/$subsys -o -f /var/lock/subsys/$subsys.init ] \#::		&& continue#::		    #::	# If we're in confirmation mode, get user confirmation#::	if [ -n "$CONFIRM" ]; then#::		confirm $subsys#::		case $? in#::			0) :;;#::			2) CONFIRM=;;#::			*) continue;;#::		esac #::	fi#::#::	# Bring the subsystem up.#::	if [ "$subsys" = "halt" -o "$subsys" = "reboot" ]; then#::		export LC_ALL=C#::		exec $i start#::	fi#::	if egrep -q "(daemon |action |success |failure )" $i 2>/dev/null \#::			|| [ "$subsys" = "single" -o "$subsys" = "local" ]; then#::		$i start#::	else#::		action $"Starting $subsys: " $i start#::	fi#::done

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -