EasyManua.ls Logo

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

Symantec ALTIRIS DEPLOYMENT SOLUTION 6.9 SP4 - V1.0
503 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Deployment Solution 240
Deploying Scripts
End If
Next
Next
Else
WSHShell.Run ".\WLogevent.exe -c:" & ErrNum & " -l:3 -
ss:""Error:" & _ Err.Description & """" , 1, true
Err.Clear
End If
Linux Shell Error Handling
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;

Table of Contents

Related product manuals