Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 27261 Details for
Bug 44489
rc-update current: sync runlevel with current running services
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against rc-update, baselayout-1.8.6.13
rc-update-current.patch (text/plain), 1.76 KB, created by
Eldad Zack (RETIRED)
on 2004-03-12 12:53:27 UTC
(
hide
)
Description:
patch against rc-update, baselayout-1.8.6.13
Filename:
MIME Type:
Creator:
Eldad Zack (RETIRED)
Created:
2004-03-12 12:53:27 UTC
Size:
1.76 KB
patch
obsolete
>--- /sbin/rc-update 2004-02-09 10:53:47.000000000 +0200 >+++ rc-update 2004-03-12 22:47:11.007855168 +0200 >@@ -12,9 +12,10 @@ > > usage() { > cat << FOO >-usage: rc-update -a|add script runlevel2 [runlevel2...] >+usage: rc-update -a|add script runlevel1 [runlevel2...] > rc-update -d|del script [runlevel1...] > rc-update -s|show [runlevel1...] >+ rc-update -c|current runlevel > > note: > After rc-update executes, the script dependency cache is automatically >@@ -38,6 +39,11 @@ > Show all the available scripts and list at which runlevels they > will execute. > >+ rc-update current default >+ Synchornize current running services with the "default" runlevel, >+ creating "default" it is doesn't exist. >+ use without any argument to sync to current runlevel. >+ > FOO > exit 1 > } >@@ -159,6 +165,50 @@ > done > } > >+current() { >+ >+ local x= >+ local mylevel= >+ >+ shift >+ if [ $# -eq 0 ] >+ then >+ mylevel=$(cat /var/lib/init.d/softlevel) >+ ewarn "Using current runlevel: ${mylevel}" >+ echo >+ else >+ mylevel=$1 >+ fi >+ >+ if [ ! -e "/etc/runlevels/${mylevel}" ] >+ then >+ einfo Creating runlevel ${mylevel} >+ echo >+ mkdir "/etc/runlevels/${mylevel}" >+ fi >+ >+ # Scan current started services and add them to current runlevel >+ >+ for x in $( cd /var/lib/init.d/started/ ; ls ) >+ do >+ if [ ! -L "/etc/runlevels/${mylevel}/${x}" ] >+ then >+ add shift ${x} ${mylevel} >+ fi >+ done >+ >+ # Scan current runlevel for non-running services, and remove them >+ >+ for x in $( cd /etc/runlevels/${mylevel} ; ls ) >+ do >+ if [ ! -L "/var/lib/init.d/started/${x}" ] >+ then >+ del shift ${x} ${mylevel} >+ fi >+ done >+ >+} >+ > if [ $# -lt 1 ] > then > usage >@@ -177,6 +227,9 @@ > show|-s) > show "$@" > ;; >+ current|-c) >+ current "$@" >+ ;; > *) > usage > exit 1
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 44489
:
27261
|
27262
|
33055
|
33056