Compare commits
	
		
			4 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 60eadd5fa2 | ||
|   | 2a203b9b6e | ||
|   | a769ea1b92 | ||
|   | 6f564b59cc | 
							
								
								
									
										46
									
								
								ChangeLog
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								ChangeLog
									
									
									
									
									
								
							| @@ -1,3 +1,34 @@ | |||||||
|  | commit 2a203b9b6e91e4ed140750eb9223012035870864 | ||||||
|  | Author: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  | Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  |  | ||||||
|  |     sysfs: fix cgroup hybrid mode | ||||||
|  |      | ||||||
|  |     In hybrid mode, we should not try to mount cgroup2 if it is not | ||||||
|  |     available in the kernel. | ||||||
|  |      | ||||||
|  |     This fixes #164. | ||||||
|  |  | ||||||
|  | commit a769ea1b92f47254edf11458d2c8b79d3819e0e6 | ||||||
|  | Author: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  | Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  |  | ||||||
|  |     cgroup2_find_path: use legacy mode if cgroup2 is not in the kernel | ||||||
|  |      | ||||||
|  |     This is related to #164. | ||||||
|  |  | ||||||
|  | commit 6f564b59cc15e688b2fa0758fa9797632e0751d7 | ||||||
|  | Author: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  | Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  |  | ||||||
|  |     version 0.31.1 | ||||||
|  |  | ||||||
|  | commit e312e569970c74cf52e255da67034391b68dafac | ||||||
|  | Author: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  | Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||||
|  |  | ||||||
|  |     Update ChangeLog | ||||||
|  |  | ||||||
| commit 2f60a959b442866b0e879d83f2732c4fa3ed3f7d | commit 2f60a959b442866b0e879d83f2732c4fa3ed3f7d | ||||||
| Author: William Hubbs <w.d.hubbs@gmail.com> | Author: William Hubbs <w.d.hubbs@gmail.com> | ||||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> | Commit: William Hubbs <w.d.hubbs@gmail.com> | ||||||
| @@ -1421,18 +1452,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com> | |||||||
|     now have a request to enable it. |     now have a request to enable it. | ||||||
|      |      | ||||||
|     This fixes #24. |     This fixes #24. | ||||||
|  |  | ||||||
| commit c146b966913ae80652e3be925d3aba60ed82f14d |  | ||||||
| Author: William Hubbs <w.d.hubbs@gmail.com> |  | ||||||
| Commit: William Hubbs <w.d.hubbs@gmail.com> |  | ||||||
|  |  | ||||||
|     Add command_progress variable |  | ||||||
|      |  | ||||||
|     If this is set to yes, 1, true, or on, start-stop-daemon will display a |  | ||||||
|     progress meter while waiting for a daemon to stop. |  | ||||||
|  |  | ||||||
| commit 6cabaf274defa11773094a2c85b3d0a9f0bd9b08 |  | ||||||
| Author: Doug Freed <dwfreed@mtu.edu> |  | ||||||
| Commit: Doug Freed <dwfreed@mtu.edu> |  | ||||||
|  |  | ||||||
|     rc-misc: allow EINFO_VERBOSE through too |  | ||||||
|   | |||||||
| @@ -1,3 +1,3 @@ | |||||||
| NAME=		openrc | NAME=		openrc | ||||||
| VERSION=	0.31 | VERSION=	0.31.1 | ||||||
| PKG=		${NAME}-${VERSION} | PKG=		${NAME}-${VERSION} | ||||||
|   | |||||||
| @@ -150,6 +150,16 @@ cgroup1_controllers() | |||||||
| 	return 0 | 	return 0 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | cgroup2_base() | ||||||
|  | { | ||||||
|  | 	local base | ||||||
|  | 	base="$(cgroup2_find_path)" | ||||||
|  | 	mkdir -p "${base}" | ||||||
|  | 	mount -t cgroup2 none -o "${sysfs_opts},nsdelegate" "${base}" 2> /dev/null || | ||||||
|  | 		mount -t cgroup2 none -o "${sysfs_opts}" "${base}" | ||||||
|  | 	return 0 | ||||||
|  | } | ||||||
|  |  | ||||||
| cgroup2_controllers() | cgroup2_controllers() | ||||||
| { | { | ||||||
| 	local active cgroup_path x y | 	local active cgroup_path x y | ||||||
| @@ -169,13 +179,12 @@ cgroup2_controllers() | |||||||
|  |  | ||||||
| cgroups_hybrid() | cgroups_hybrid() | ||||||
| { | { | ||||||
| 	grep -qw cgroup /proc/filesystems && | 	grep -qw cgroup /proc/filesystems || return 0 | ||||||
| 		grep -qw cgroup2 /proc/filesystems || |  | ||||||
| 		return 0 |  | ||||||
| 	cgroup1_base | 	cgroup1_base | ||||||
| 	mkdir /sys/fs/cgroup/unified | 	if grep -qw cgroup2 /proc/filesystems; then | ||||||
| 	mount -t cgroup2 none -o "${sysfs_opts},nsdelegate" /sys/fs/cgroup/unified | 		cgroup2_base | ||||||
| 	cgroup2_controllers | 		cgroup2_controllers | ||||||
|  | 	fi | ||||||
| 	cgroup1_controllers | 	cgroup1_controllers | ||||||
| 	return 0 | 	return 0 | ||||||
| } | } | ||||||
| @@ -190,8 +199,8 @@ cgroups_legacy() | |||||||
|  |  | ||||||
| cgroups_unified() | cgroups_unified() | ||||||
| { | { | ||||||
| 	grep -qw cgroup2 /proc/filesystems || return 0 | 	cgroup2_base | ||||||
| 	mount -t cgroup2 none -o "${sysfs_opts},nsdelegate" /sys/fs/cgroup | 	cgroup2_controllers | ||||||
| 	return 0 | 	return 0 | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -146,10 +146,12 @@ cgroup_set_limits() | |||||||
|  |  | ||||||
| cgroup2_find_path() | cgroup2_find_path() | ||||||
| { | { | ||||||
| 	case "${rc_cgroup_mode:-hybrid}" in | 	if grep -qw cgroup2 /proc/filesystems; then | ||||||
| 		hybrid) printf "/sys/fs/cgroup/unified" ;; | 		case "${rc_cgroup_mode:-hybrid}" in | ||||||
| 		unified) printf "/sys/fs/cgroup" ;; | 			hybrid) printf "/sys/fs/cgroup/unified" ;; | ||||||
|  | 			unified) printf "/sys/fs/cgroup" ;; | ||||||
| 		esac | 		esac | ||||||
|  | 	fi | ||||||
| 		return 0 | 		return 0 | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -180,7 +182,7 @@ cgroup2_set_limits() | |||||||
| { | { | ||||||
| 	local cgroup_path | 	local cgroup_path | ||||||
| 	cgroup_path="$(cgroup2_find_path)" | 	cgroup_path="$(cgroup2_find_path)" | ||||||
| 	[ -z "${cgroup_path}" ] && return 0 | 	[ -d "${cgroup_path}" ] || return 0 | ||||||
| 	rc_cgroup_path="${cgroup_path}/${RC_SVCNAME}" | 	rc_cgroup_path="${cgroup_path}/${RC_SVCNAME}" | ||||||
| 	local OIFS="$IFS" | 	local OIFS="$IFS" | ||||||
| 	IFS=" | 	IFS=" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user