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:

 

  1. Create a file called blat.csh with the following inside it:
    1. echo “BLAT!” >> /tmp/testfile
  2. In SCCM 2012 SP1 Create a package with the above file in it.
  3. Create a program in the package with the following command line:
    1. sh blat.csh
  4. 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.

Comments (4)

  1. james says:

    A "Practical guide to Ubuntu" provides you a broad understanding of the many sides of UNIX. regardless of what your background, this book provides the information you would like to urge on together with your work. This book explains a way to use UNIX from graphical interface and from the instruction. Here I found some useful information related to linux: http://www.techbluesoftware.co.in/…/phonegap-app-development.html

  2. Alan Dooley says:

    Using RHEL I've tried a load of different options e.g.:

    sh blat.csh
    bash blat.csh
    bash ./blat.csh

    All come back saying successful in SCCM but the file it not created. The script is in the cache and if I cd into that folder and execute it using bash ./blat.csh it works fine.

    Any clues? The verbose logging on the client side shows nothing.

  3. Alan Dooley says:

    For anyone using RHEL I had to ensure that my scripts started with

    #!/bin/bash

    then call them with sh

    Also make sure you convert the EOL characters CRLF to just LF if writing your scripts in Windows. Notepad++ can do this via the Edit -> EOL Conversion menu

  4. Vinod Lewis says:

    Well i am getting an error Dequeue failed for task because the task could not be found. Please assist.

Skip to main content