Testing software deployment for a Linux machine
I was recently working with a customer to setup management of their Mac and Linux machines with System Center Configuration Manager 2012 and once we had things up and running we wanted to validate the client communication. In the windows world I often setup a simple SWDist of something like CMTrace to do this, but in the Linux world I wasn’t sure what to do. I work for Microsoft so my interactions with Linux are… very limited. That said, I worked with my customer to come up with a simple app that I thought others might want to make use of in their Linux testing as well.
The goal was to be simple, generic, and easy. We came up with the idea of launching a shell file (similar to a windows batch file) that simply echoes text to a text file. By making a file, instead of a command line, we would be sure to exercise DP access and communication for the *inx client. Here is what we did:
- Create a file called blat.csh with the following inside it:
- echo “BLAT!” >> /tmp/testfile
- In SCCM 2012 SP1 Create a package with the above file in it.
- Create a program in the package with the following command line:
- sh blat.csh
- Make a deployment of that program/package to your Linux machine and keep an eye on your scxcm.log to see when it kicks through.
Keep in mind the command line syntax. Similar to how sometimes you would call a vbscript (cscript blah.wsf) or a command prompt function (cmd.exe /c copy blah.dll c:\foo\bar\blah.dll) you need to call the shell for Linux to properly run the command. I’m not a Linux expert so while we tried a few different shells, using the SH shell seemed to work better than other things we tried.
My thanks to M.C. in California and his co-worker for helping me improve my Linux knowledge.