Project

General

Profile

Actions

Bug #4693

closed

User story #4595: Support for AIX (agent only)

RPM postinst fails on AIX due to attempt to edit a cron.d file

Added by Jonathan CLARKE over 10 years ago. Updated over 9 years ago.

Status:
Released
Priority:
2
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

As changed in #4684, we don't install a cron.d file on AIX. However, the change overlooked this part of the RPM's postinst:

# Add temporary cron for checking UUID. This cron is created in postinst
# in order to remove it later without complains of the package manager.
CHECK_RUDDER_AGENT_CRON=`grep "/opt/rudder/bin/check-rudder-agent" /etc/cron.d/rudder-agent | wc -l`                                                                                                                                         
TMP_CRON=/etc/cron.d/rudder-agent-uuid
# Add it only if the default cron file does not call check-rudder-agent script
if [ ${CHECK_RUDDER_AGENT_CRON} -eq 0 ]; then
  if [ ! -f ${TMP_CRON} ]; then
    echo "0,5,10,15,20,25,30,35,40,45,50,55 * * * * root /opt/rudder/bin/check-rudder-agent" > ${TMP_CRON}
  fi  
fi

# Vixie-cron and cronie (at least) expect specific permissions to be applied
# on /etc/cron.d entries, and will refuse to load executable files.
if [ -f ${TMP_CRON} ]; then
  chmod 644 ${TMP_CRON}
fi

I will just wrap this in a "!AIX" section, to avoid it being run on AIX.

Actions

Also available in: Atom PDF