Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit47a0732

Browse files
committed
skip checks A008 and D002 on error
1 parent82190dd commit47a0732

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎resources/checks/A008_disk_usage_fstype.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ df_to_json() {
8080
}"
8181
else
8282
errmsg"ERROR: Wrong result of 'sudo df' command"
83-
return 1
83+
exit 1
8484
fi
8585
return 0
8686
}
@@ -98,7 +98,7 @@ df_to_json() {
9898
print_df() {
9999
local path="$1"
100100
local rawDf=$(${CHECK_HOST_CMD}"sudo df -TPh\"${path}\"")
101-
df=$(echo"$rawDf"| grep -v"\[sudo\] password for"| tail -n+2)
101+
df=$(echo"$rawDf"| grep -v"\[sudo\] password for"| tail -n1)
102102
if df_to_json"${path}"$df;then
103103
rawDf=""
104104
else

‎resources/checks/D002_useful_linux_tools.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ res2=$(${CHECK_HOST_CMD} "sudo which sudo")
5151
res2=$(echo"$res2"| grep -v"\[sudo\] password for")
5252
if [["$res1"!="$res2" ]];then
5353
errmsg"ERROR: Can not execute 'which' on target server."
54+
exit 1
5455
fi
5556

5657
# build json object to stdout

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp