Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 434698

Summary: dev-libs/libcgroup: init.d script is not POSIX compliant
Product: Gentoo Linux Reporter: Natanael Copa <natanael.copa>
Component: [OLD] UnspecifiedAssignee: Anthony Basile <blueness>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: untested patch

Description Natanael Copa 2012-09-11 08:04:46 UTC
The cgconfig.initd script uses bash arrays which requires bash. The init.d scripts should be POSIX compliant.
Comment 1 Natanael Copa 2012-09-11 08:42:28 UTC
Created attachment 323478 [details, diff]
untested patch

Should behave *exactly* the same as current init.d (eg break if you have a lvm device called /dev/vg0/lv_macgroup or similar) while still being POSIX compliant.

Completely untested.
Comment 2 Alexander Vershilov (RETIRED) gentoo-dev 2013-05-28 21:08:55 UTC
There are a list of a problems in these init scripts and it's logic should be reviewed because openrc handles main cgroups itself. I'll try to post questions in the nearest future.
Comment 3 Mark 2014-01-23 01:42:43 UTC
Minor fix, while in cgred init script can you change:

start() {
	local options="${NODAEMON} ${LOG}"
	if [[ -n "${LOG_FILE}" ]]; then
		options="${options} --log-file=${LOG_FILE}"      


to:


start() {
	local options="${NODAEMON} ${LOG}"
	if [[ -n "${LOG_FILE}" ]]; then
		options="${options} --logfile=${LOG_FILE}"      


I fixed this for myself but it must not be much of an issue since no one else has written a bug.  I know I am not supposed to do it this way.
Comment 4 Anthony Basile gentoo-dev 2016-01-10 21:16:14 UTC
the init scripts have been completely redone with libcgroup-0.41-r3.ebuild and should be POSIX.  Please reopen if you see anything that isn't.