File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 231
231
232
232
# Output system information of the backup host
233
233
234
- # If /etc/issue.net exists, use it to get the OS version
235
- if [ -f /etc/issue.net ]; then
236
- echo " Running on: $( cat /etc/issue.net) "
234
+ # If /etc/os-release exists, use it to get the OS version
235
+ if [ -f /etc/os-release ]; then
236
+ OS_NAME=$( grep ' ^NAME' /etc/os-release | cut -d' "' -f2)
237
+ VERSION_ID=$( grep ' ^VERSION_ID' /etc/os-release | cut -d' "' -f2)
238
+ echo " Running on: $OS_NAME $VERSION_ID "
237
239
else
238
240
echo " Running on: Unknown OS"
239
241
fi
Original file line number Diff line number Diff line change @@ -1068,7 +1068,9 @@ begin_test "ghe-backup collects information on system where backup-utils is inst
1068
1068
set -e
1069
1069
1070
1070
output=$( ghe-backup)
1071
- echo " $output " | grep " Running on: $( cat /etc/issue.net) "
1071
+ OS_NAME=$( grep ' ^NAME' /etc/os-release | cut -d' "' -f2)
1072
+ VERSION_ID=$( grep ' ^VERSION_ID' /etc/os-release | cut -d' "' -f2)
1073
+ echo " $output " | grep " Running on: $OS_NAME $VERSION_ID "
1072
1074
echo " $output " | grep " CPUs: $( nproc) "
1073
1075
echo " $output " | grep " Memory total/used/free+share/buff/cache:"
1074
1076
@@ -1088,4 +1090,4 @@ begin_test "ghe-backup manages progress tracking files properly"
1088
1090
echo " $output " | grep -v " mkdir: cannot create directory /tmp/backup-utils-progress: File exists"
1089
1091
1090
1092
)
1091
- end_test
1093
+ end_test
You can’t perform that action at this time.
0 commit comments