Linux Shell Error Handling - Symantec ALTIRIS DEPLOYMENT SOLUTION 6.9 SP4 - V1.0 Manual

Table of Contents

Advertisement

Linux Shell Error Handling

Deployment Solution
End If
Next
Next
Else
WSHShell.Run ".\WLogevent.exe -c:" & ErrNum & " -l:3 -
ss:""Error:" & _ Err.Description &
Err.Clear
End If
The logevent command is provided in the Linux agent, so any Linux computer with the
agent installed has local access to logevent.
Similar to Visual Basic script, Linux provides a powerful method to track error values.
When running scripts on Linux, use logevent to report the status to the server after you
have used the built-in mechanisms to retrieve errors.
The following script contains an example of error handling on Linux:
#!/bin/sh
export PATH=$PATH:/opt/altiris/deployment/adlagent/bin
grep foo foo.txt
ERRVAL = $?
if [ $ERRVAL -ne 0 ]; then
logevent -c:$ERRVAL -l:3 -ss:"error executing grep"
fi;
Deploying Scripts
"""" , 1, true
240

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Altiris deployment solution 6.9 sp4

Table of Contents