We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b3d82b1 + 3362a7c commit 027554fCopy full SHA for 027554f
1 file changed
agents/plugins/yum
@@ -14,7 +14,11 @@ CACHE_PREV_UPTIME=$MK_VARDIR/cache/yum_uptime.cache
14
LAST_UPDATE_TIMESTAMP=-1
15
16
# Check which major version we are running so we can run appropriate commands
17
-MAJOR_VERSION=$(grep -oP '(?<=^VERSION_ID=").*(?=")' /etc/os-release | cut -d '.' -f 1)
+if [ -f "/etc/os-release" ]; then
18
+ MAJOR_VERSION=$(grep -oP '(?<=^VERSION_ID=").*(?=")' /etc/os-release | cut -d '.' -f 1)
19
+else
20
+ MAJOR_VERSION=0
21
+fi
22
23
# get current yum state - use cache directory contents as fingerprint
24
YUM_CURRENT="$(ls -lR /var/cache/{yum,dnf}/ 2>/dev/null)"
0 commit comments