お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2018-03-22 22:52:27

quae
メンバ
登録日: 2015-09-17

書き換えの仕方。

http://incompleteness-theorems.at.webry.info/201006/article_4.htmlを参考にして、起動時間を速めたいのですが、ここでつまづきました。

Ctl+fでCONCURRENCYって文字列を探して
CONCURRENCY=shell
に書き換え。

とあるのですが、どの部分を(何箇所)書き換えればいいのでしょうか?

concurrencyで見つかるそれらしいところのコピーです。

CONCURRENCY=makefileのところでしょうか?
それとも”none”をshellに変えるのでしょうか?

よろしくおねがいします。


#CONCURRENCY=makefile
# disable startpar, incompatible with "task" upstart jobs
CONCURRENCY=none
test -s /etc/init.d/.depend.boot  || CONCURRENCY="none"
test -s /etc/init.d/.depend.start || CONCURRENCY="none"
test -s /etc/init.d/.depend.stop  || CONCURRENCY="none"
if test -e /etc/init.d/.legacy-bootordering ; then
    CONCURRENCY="none"
fi
if ! test -e /proc/stat; then
    # startpar requires /proc/stat
    if [ "$(uname)" = "GNU/kFreeBSD" ] ; then
        mount -t linprocfs linprocfs /proc
    elif [ "$(uname)" = "GNU" ] ; then
        mount -t proc none /proc
    fi
fi
if [ -x /lib/startpar/startpar ] ; then
    STARTPAR=/lib/startpar/startpar
else
    STARTPAR=startpar
fi
$STARTPAR -v > /dev/null 2>&1 || CONCURRENCY="none"

#
# Start script or program.
#
case "$CONCURRENCY" in
    makefile|startpar|shell) # startpar and shell are obsolete
        CONCURRENCY=makefile
        log_action_msg "Using makefile-style concurrent boot in runlevel $runlevel"
        startup() {
            eval "$($STARTPAR -p 4 -t 20 -T 3 -M $1 -P $previous -R $runlevel)"

            if [ -n "$failed_service" ]
            then
                log_failure_msg "startpar: service(s) returned failure: $failed_service"
            fi

            if [ -n "$skipped_service_not_installed" ]
            then
                log_warning_msg "startpar: service(s) skipped, program is not installed: $skipped_service_not_installed"
            fi

            if [ -n "$skipped_service_not_configured" ]
            then
                log_warning_msg "startpar: service(s) skipped, program is not configured: $skipped_service_not_configured"
            fi

            unset failed_service skipped_service_not_installed skipped_service_not_configured
        }
        ;;
    none|*)
        startup() {
            action=$1
            shift
            scripts="$@"
            for script in $scripts ; do
                $debug "$script" $action
            done
        }
        ;;
esac

# Is there an rc directory for this new runlevel?
if [ -d /etc/rc$runlevel.d ]
then
    case "$runlevel" in
        0|6)
            ACTION=stop
            ;;
        S)
            ACTION=start
            ;;
        *)
            ACTION=start
            ;;
    esac

    # First, run the KILL scripts.
    if [ makefile = "$CONCURRENCY" ]
    then
        if [ "$ACTION" = "start" ] && [ "$previous" != N ]
        then
            startup stop
        fi
    elif [ "$previous" != N ]
    then
        # Run all scripts with the same level in parallel
        CURLEVEL=""
        for s in /etc/rc$runlevel.d/K*
        do
            # Extract order value from symlink
            level=${s#/etc/rc$runlevel.d/K}
            level=${level%%[a-zA-Z]*}
            if [ "$level" = "$CURLEVEL" ]
            then
                continue
            fi
            CURLEVEL=$level
            SCRIPTS=""
            for i in /etc/rc$runlevel.d/K$level*
            do
                # Check if the script is there.
                [ ! -f $i ] && continue

                #
                # Find stop script in previous runlevel but
                # no start script there.
                #
                suffix=${i#/etc/rc$runlevel.d/K[0-9][0-9]}
                previous_stop=/etc/rc$previous.d/K[0-9][0-9]$suffix
                previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
                #
                # If there is a stop script in the previous level
                # and _no_ start script there, we don't
                # have to re-stop the service.
                #
                [ -f $previous_stop ] && [ ! -f $previous_start ] && continue

                # Stop the service.
                SCRIPTS="$SCRIPTS $i"
            done
            startup stop $SCRIPTS
        done
    fi

    if [ makefile = "$CONCURRENCY" ]

オフライン

 

Board footer

Powered by FluxBB