Unable to Launch Linux Executable action on RHEL 5.5

  • 7009395
  • 20-Sep-2011
  • 27-Apr-2012

Environment

Novell ZENworks 11 Configuration Management Support Pack 1 - ZCM 11 SP1 Bundles
3rd Party Operating Systems and Products
RedHat Linux

Situation

Some Linux bundles with Launch Linux Executable action - executable does not launch

Resolution

This is fixed in version 11.2 - see KB 7010044 "ZENworks Configuration Management 11.2 - update information and list of fixes" which can be found at https://www.novell.com/support

Workaround: add the following lines to /etc/init.d/novell-zenworks-xplatzmd  after the line "export PATH"


========================================
# set the HOME variable
if [ "$HOME" == ""] ; then
HOME=`grep "^root:" /etc/passwd|cut -d ":" -f 6`
if [ "$HOME" == ""] ; then
HOME="/root"
fi
fi
export HOME
==========================================

Additional Information

Root cause: $HOME is not set when zmd is started at system startup, so applications such as Firefox that rely on this variable fail

extract from zmd-messages.log:
[Debug] [09/17/2011 01:56:25.950] [] [4634] [ZenworksAgent] [64] [Launch Linux Executable Action] [Launching Linux Executable :"/usr/bin/firefox"] [] []
[Debug] [09/17/2011 01:56:26.038] [] [4634] [ZenworksAgent] [64] [ExternalCmd] [Executed command (/usr/bin/last, -1, :0) : exit value = 0, error = none.] [] []
[Debug] [09/17/2011 01:56:26.111] [] [4634] [ZenworksAgent] [64] [ActionManager] [Action handler com.novell.zenworks.agent.extensions.actionhandlers.LaunchLinuxExecActionHandler finished processing Launch Linux Executable successfully.] [] []
[Debug] [09/17/2011 01:56:26.116] [] [4634] [ZenworksAgent] [64] [ActionManager] [Updating status for set 44324e1a4b25a21c49c1e254f588cefe] [] []
[Debug] [09/17/2011 01:56:26.117] [] [4634] [ZenworksAgent] [64] [ActionManager] [GetResultSetRequest returning DO_NOTHING] [] []
[Debug] [09/17/2011 01:56:26.117] [] [4634] [ZenworksAgent] [64] [Bundle Manager] [UpdateLastRunTime Method true] [] []
[Debug] [09/17/2011 01:56:26.117] [] [4634] [ZenworksAgent] [64] [Bundle Manager] [After getLocalStateInfocom.novell.zenworks.agent.zenbundle.settings.AppLocalState@5c7ff512] [] []