diff options
author | Andrew Cady <d@cryptonomic.net> | 2022-01-12 12:06:51 -0500 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2022-01-12 12:06:51 -0500 |
commit | 7cd5e3d95512ef83bdc19dca9268b499785ea777 (patch) | |
tree | 5c10f677c3024e8fcf94ca05810c52a78693225e /sliceweasel.lib.sh | |
parent | 03d676f924adb59156a132d1098dce52a76154ee (diff) |
change get_current_group semantics to return absolute path
Diffstat (limited to 'sliceweasel.lib.sh')
-rwxr-xr-x | sliceweasel.lib.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sliceweasel.lib.sh b/sliceweasel.lib.sh index 24221e2..bbaed78 100755 --- a/sliceweasel.lib.sh +++ b/sliceweasel.lib.sh | |||
@@ -84,7 +84,7 @@ add_subtree_controller() | |||
84 | set_max() | 84 | set_max() |
85 | { | 85 | { |
86 | add_subtree_controller "$1"/.. "$2" | 86 | add_subtree_controller "$1"/.. "$2" |
87 | max_file=/sys/fs/cgroup/$group/$2.max | 87 | max_file=$group/$2.max |
88 | [ -e "$max_file" ] || return | 88 | [ -e "$max_file" ] || return |
89 | printf '%s\n' "$3" | root_write "$max_file" | 89 | printf '%s\n' "$3" | root_write "$max_file" |
90 | } | 90 | } |
@@ -116,5 +116,5 @@ set_max_ratio() | |||
116 | get_current_group() | 116 | get_current_group() |
117 | { | 117 | { |
118 | read g < /proc/$$/cgroup | 118 | read g < /proc/$$/cgroup |
119 | echo ${g#0::/} | 119 | echo /sys/fs/cgroup/${g#0::/} |
120 | } | 120 | } |