Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 6620 Details for
Bug 12479
A chkconfig for gentoo
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
the script
chkconfig (text/plain), 2.48 KB, created by
Sébastien ESTIENNE
on 2002-12-20 05:52:46 UTC
(
hide
)
Description:
the script
Filename:
MIME Type:
Creator:
Sébastien ESTIENNE
Created:
2002-12-20 05:52:46 UTC
Size:
2.48 KB
patch
obsolete
>#!/bin/bash > ># ># Sebastien ESTIENNE <sebest@ovibes.net> ># > >VERSION="0.5" >RCUPDATE="/sbin/rc-update" >RUNLEVELDIR="/etc/runlevels/" >RUNLEVELS="boot default nonetwork single" >SRVDIR="/etc/init.d/" > >list= >add= >del= > >basename=${0##*/} > ># ># Usage ># >usage () { >cat << EOF 1>&2 >Chkconfig for Gentoo version ${VERSION}. >This may be freely redistributed under the terms of the GNU Public License. > >usage: $basename --list [name] > $basename --add <name> > $basename --del <name> > $basename [--level <levels>] <name> <on|off> > $basename --help > >EOF >exit 1 >} > ># ># Aucun parametre ># >if [ "$#" -eq "0" ] >then > usage >fi > ># ># Gestion des parametres ># >while [[ $1 = --* ]] || [[ $1 = -* ]];do > opt=$1 > shift > case $opt in > --list) list=yes;; > --add) add=yes;; > --del) del=yes;; > --level) level=yes;; > --help) usage;; > *) echo "Unknow option $opt"; usage; > esac >done > > ># ># On est soit en --level soit le dernier parametre est on ou off ># >if [ $level ] || [ "x${2##*/}" = "xon" ] || [ "x${2##*/}" = "xoff" ] >then > levels="default" > if [ $level ] ; then levels=`echo $@ | cut -d " " -f-$(( $# - 2 ))` ; fi > service=`echo $@ | cut -d " " -f$(( $# - 1 ))` > action=`echo $@ | cut -d " " -f$#-` > > if [ "$action" = "on" ] > then > action="add" > else > if [ "$action" = "off" ] > then > action="del" > else > usage; > fi > fi > > if [ -e ${SRVDIR}/${service} ] > then > $RCUPDATE $action $service $levels > else > echo "Service: ${service} doesn't exist." > fi >else > service=${1##*/}; shift; >fi > ># ># --add ># >if [ $add ];then > if [ -e ${SRVDIR}/${service} ] > then > $RCUPDATE add $service default > else > echo "Service: ${service} doesn't exist." > fi >fi > ># ># --del ># >if [ $del ];then > if [ -e ${SRVDIR}/${service} ] > then > $RCUPDATE del $service default > else > echo "Service: ${service} doesn't exist." > fi >fi > ># ># --list ># >if [ $list ];then > if [ $service ] && [ -e ${SRVDIR}/${service} ];then > SERVICES=$service > else > SERVICES=`cd ${SRVDIR} && grep -l "#\!/sbin/runscript" * | grep -v "\.sh"` > fi > for SRV in ${SERVICES} > do > echo -n "${SRV} " > for RLVL in ${RUNLEVELS} > do > if [ -e ${RUNLEVELDIR}/${RLVL}/${SRV} ] > then > echo -n "${RLVL}:on " > else > echo -n "${RLVL}:off " > fi > done > echo > done | column -t >fi
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 12479
: 6620