Replace bare $var with ${var} everywhere it was still used, matching
the convention already established in rc.d/prompt and rc.d/history.
Positional parameters ($1, $@, $#) and special variables ($?, $$, $-)
are left as-is, consistent with existing usage in _helpers.bash.
rc.d/broot is auto-generated by the broot binary and will likely be
overwritten with its original formatting on the next broot update.
18 lines
353 B
Plaintext
18 lines
353 B
Plaintext
# Use cgroups
|
|
if [ "${PS1}" ] ; then
|
|
|
|
if [ -d /sys/fs/cgroup ] ; then
|
|
cdir=/sys/fs/cgroup
|
|
elif [ -d /dev/cgroup ]; then
|
|
cdir=/dev/cgroup
|
|
fi
|
|
|
|
if [ -d "${cdir}/user" ]; then
|
|
mkdir -p -m 0700 "${cdir}/user/$$" > /dev/null 2>&1
|
|
/bin/echo $$ > "${cdir}/user/$$/tasks"
|
|
/bin/echo '1' > "${cdir}/user/$$/notify_on_release"
|
|
unset -v cdir
|
|
fi
|
|
|
|
fi
|