Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93246 - hb-working-initscripts: use more elegant way to create runlevel
Summary: hb-working-initscripts: use more elegant way to create runlevel
Status: RESOLVED FIXED
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Handbook (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Xavier Neys (RETIRED)
URL: http://www.gentoo.org/doc/en/handbook...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-19 13:32 UTC by Jan Kundrát (RETIRED)
Modified: 2005-05-20 07:23 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
doc/en/hb-working-rcscripts.xml.patch (hb-working-rcscripts.xml.patch,870 bytes, patch)
2005-05-19 13:33 UTC, Jan Kundrát (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát (RETIRED) gentoo-dev 2005-05-19 13:32:08 UTC
What about replacing bunch of `rc-update add $service offline` with simple `for`? Patch will follow...
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2005-05-19 13:33:41 UTC
Created attachment 59322 [details, diff]
doc/en/hb-working-rcscripts.xml.patch
Comment 2 Xavier Neys (RETIRED) gentoo-dev 2005-05-19 15:59:24 UTC
Also s/Voila/Voil
Comment 3 Xavier Neys (RETIRED) gentoo-dev 2005-05-19 15:59:24 UTC
Also s/Voila/Voilà/ , s/SOFTLEVEL/softlevel/ & BOOTLEVEL as well
Comment 4 Xavier Neys (RETIRED) gentoo-dev 2005-05-19 16:10:30 UTC
Thanks for the suggestion.
Comment 5 Alin Dobre (RETIRED) gentoo-dev 2005-05-19 21:39:35 UTC
the for statement is not correct. it will issue (in one of the loops):
rc-update add /etc/runlevels/default/foo offline
which will lead to an error:
 * /sbin/rc-update: /etc/init.d//etc/runlevels/default/foo not found; aborting.

as you can see, rc-update appends the '/etc/init.d/' path to the third
parameter. the correct statement would be:
1)
cd /etc/runlevels/default
for service in *; do rc-update add $service offline; done
2)
for service in *; do rc-update add `basename $service` offline; done

of course, there are other solutions, too, but i have only pointed out 2 easy ones.
Comment 6 Xavier Neys (RETIRED) gentoo-dev 2005-05-20 01:32:46 UTC
Really should not do those in the middle of the night.
Sorry.
Comment 7 Jan Kundrát (RETIRED) gentoo-dev 2005-05-20 07:23:30 UTC
Err, sorry for bogous patch :-(. It was tested only with "... do echo rc-updatte
$service ...".