Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 24481 Details for
Bug 39350
chessbrain-30124 (update)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
New init.d file
cb-init-2.d (text/plain), 1.69 KB, created by
Klaus S. Madsen
on 2004-01-27 04:49:55 UTC
(
hide
)
Description:
New init.d file
Filename:
MIME Type:
Creator:
Klaus S. Madsen
Created:
2004-01-27 04:49:55 UTC
Size:
1.69 KB
patch
obsolete
>#!/sbin/runscript > >cpus=`egrep -c "^processor" /proc/cpuinfo` > >checkconfig() { > if [ ! -e ${CHESSBRAIN_DIR} ] > then > einfo "Creating ${CHESSBRAIN_DIR}" > mkdir ${CHESSBRAIN_DIR} > fi >} > ># Generate a cbspn.conf file in the specified directory. >generateconfig() { > FN=$1/cbspn.conf > > rm -f $FN > > [ -z "$CHESSBRAIN_UID" ] && CHESSBRAIN_UID='*' > echo "uid=$CHESSBRAIN_UID" >> $FN > > [ -z "$CHESSBRAIN_PROXY" ] && CHESSBRAIN_PROXY='*' > echo "proxyaddr=$CHESSBRAIN_PROXY" >> $FN > > [ -z "$CHESSBRAIN_PORT" ] && CHESSBRAIN_PORT='*' > echo "proxyport=$CHESSBRAIN_PORT" >> $FN > > [ -z "$CHESSBRAIN_NETMON" ] && CHESSBRAIN_NETMON='*' > echo "netmon=$CHESSBRAIN_NETMON" >> $FN >} > >start() { > checkconfig > > > if [ $cpus = '1' ]; then > ebegin "Starting ChessBrain" > else > ebegin "Starting ChessBrain ($cpus processors)" > fi > > for cpu in `seq 1 $cpus`; do > cd ${CHESSBRAIN_DIR} > if [ $cpu != '1' ]; then > mkdir cpu${cpu} > cd cpu${cpu} > fi > > if [ -z ${CHESSBRAIN_LOGFILE} ]; then > log=/dev/null > elif [ $cpus -eq 1 ]; then > log=${CHESSBRAIN_LOGFILE} > else > log=${CHESSBRAIN_LOGFILE}.cpu${cpu} > fi > > generateconfig $PWD > > if [ $cpu -eq 1 ]; then > ./cbspn 1>&2 >> ${log} & > else > ../cbspn 1>&2 >> ${log} & > fi > done > > eend $? >} > >stop() { > ebegin "Stopping ChessBrain" > killall cbspn > > # Clean up > rm -f ${CHESSBRAIN_DIR}/cbspn.conf > > if [ $cpus -ge 2 ]; then > for cpu in `seq 2 $cpus`; do > rm -f ${CHESSBRAIN_DIR}/cpu${cpu}/cbspn.conf > rmdir ${CHESSBRAIN_DIR}/cpu${cpu} > done > fi > > eend $? >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 39350
:
24388
|
24389
|
24390
|
24479
|
24480
| 24481