Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/event_source/aix_cpu_watch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better put it as:
#!/usr/bin/env python
as mentioned here: https://docs.ansible.com/ansible-core/2.16/dev_guide/testing/sanity/shellcheck.html

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright: (c) 2020- IBM, Inc
Expand Down
8 changes: 3 additions & 5 deletions roles/power_aix_bootstrap/files/dnf_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ then
else
total_req=$(echo "(512)" | bc)
tmp_free=$(/usr/bin/df -m /tmp | /usr/bin/sed -e /Filesystem/d | /usr/bin/awk '{print $3}')
if [ $tmp_free -le $total_req ]
then
if [ "${tmp_free:-0}" -le "${total_req:-0}" ]; then
echo "Please make sure /tmp has around 512MB of free space to download and"
echo "extract files from dnf_bundle."
exit 1
Expand All @@ -155,8 +154,7 @@ fi
# Currently we need around 457MB of free space in /opt filesystem.
total_opt=$(echo "(512)" | bc)
opt_free=$(/usr/bin/df -m /opt | /usr/bin/sed -e /Filesystem/d | /usr/bin/head -1 | /usr/bin/awk '{print $3}')
if [[ $opt_free -le $total_opt ]]
then
if [ "${opt_free:-0}" -le "${total_opt:-0}" ]; then
echo "Total free space required for /opt filesystem to install rpms"
echo " from dnf_bundle is around 512MB."
echo "Please increase the size of /opt and retry."
Expand Down Expand Up @@ -199,7 +197,7 @@ else
/usr/bin/tar -xvf dnf_bundle_aix_71_72.tar
fi

./install_dnf.sh "$arg" "$yum4" "$yum3_instd" 2
./install_dnf.sh "$mnt_path" "$yum4" "$yum3_instd" 2
rc=$?
if [ $rc -eq 0 ]
then
Expand Down