Closed lge closed 2 months ago
Hi, @lge @oalbrigt
Impressive work! Thank you for your consideration. I understand that the issue with RHBZ:2207567 is serious. However, as Mr. Lars noted, if the dependencies are properly configured, it seems unlikely that unmounting first would cause any problems. I have come to recognize the importance of adding proper comments once again. I believe many users will appreciate this improvement.
Thanks.
if scanning /proc twice should become a problem, we could either use bash and its more advance redirections, or use fifos
procs=$(
exec 2>/dev/null
D=$(mktemp -d) # (preferably somwhere on a tmpfs, so set TMPDIR or add -p or an explicit template)
mkfifo "$D/maps";
(
< "$D/maps" xargs -r grep -l " $dir/" | cut -d/ -f3 | uniq &
exec 3> "$D/maps";
rm -rf "$D";
find /proc -path '/proc/[0-9]*' \
\( -name maps -fprint "/dev/fd/3" \
-o -type l \( -lname "$dir/*" -o -lname "$dir" \) -print \
\) | cut -d/ -f 3 | uniq
) | sort -u
)
:stuck_out_tongue_winking_eye:
Feel free to make a patch when you got the time.
We should keep it non-bash specific, as the agent can also be used on *BSD.
Feel free to make a patch when you got the time.
We should keep it non-bash specific, as the agent can also be used on *BSD.
https://github.com/ClusterLabs/resource-agents/pull/1978 (hope that is sufficiently *BSD compatible ...)
See individual commit messages.