Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
EOS-25693-new: Support Bundle generation is not creating and collecti…
Browse files Browse the repository at this point in the history
…ng data for m0reportbug-traces. (#1221)

Fix : If /proc/sysrq-trigger is mounted as ro then return.

Signed-off-by: Papan Kumar Singh <papan.kumarsingh@seagate.com>
  • Loading branch information
papan-singh authored and madhavemuri committed Dec 13, 2021
1 parent d1ec925 commit 5329969
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions utils/m0reportbug
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,10 @@ _path_rpm() {

case $name in
m0d|m0trace|m0tracedump) echo "/usr/bin/$name";;
m0cp) echo "/usr/bin/$name";;
m0client) echo "/usr/bin/$name";;
m0touch) echo "/usr/bin/$name";;
m0cat) echo "/usr/bin/$name";;
m0mkfs) echo "/usr/sbin/$name";;
m0addb2dump) echo "/usr/sbin/$name";;
m0beck|m0betool) echo "/usr/sbin/$name";;
Expand Down Expand Up @@ -699,6 +703,13 @@ sysrq_info() {
[t]='show-task-states'
[m]='show-memory-usage'
)

local fs_access=$(cat /proc/mounts | grep /proc/sysrq-trigger | awk '{print substr($4,1,2)}')
if [[ "ro" == "$fs_access" ]] ; then
warn "/proc/sysrq-trigger is read-only. Won't be able to collect system information."
return 0
fi

local old_sysrq=$(sysctl --values kernel.sysrq)

# unmask all sysrq functions
Expand Down

0 comments on commit 5329969

Please sign in to comment.