I'm using KBOX to uninstall old versions of Symantec and then install the latest Sym on reboot by using a LaunchAgent. The KBOX agent script downloads the zipped .plist file, unzips it and then moves it to the /Library/LaunchAgents folder on a Mac OS X.6.8 machine.

               /usr/bin/ditto -x -k --rsrc "/Library/Application Support/Dell/KACE/data/scripts/106/com.syminstall.Custom.plist.zip" "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder"

              /bin/mv "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder/com.syminstall.Custom.plist" "/Library/LaunchAgents/"

 

It wouldn't load, giving a "dubious ownership" error so I also asked the script to change the permissions to 664 and the owner to root.

              /bin/chmod 644 "/Library/LaunchAgents/com.syminstall.Custom.plist"

              /bin/chown root "/Library/LaunchAgents/com.syminstall.Custom.plist"

 

On reboot, however, the LaunchAgent still never loads, giving the same error as before. The Console says it gives this error: "launchctl: Dubious ownership on file (skipping): /Library/LaunchAgents/com.syminstall.Custom.plist"

 

Anyone have any ideas why it won't load?

Answer Summary:
did run into a couple of simular threads and they solved it by putting all the install files in the same folder, it looks like your install shell is in /Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder and the package is in /Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder, try changing your deployment so everything is in one folder thefishyfew Placing it all into one folder has worked. Great idea! Thank you.
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer


  • Those links tell me to change the ownership of the plist file to root and 664. I've asked KBOX to do it in the script but it doesn't do it. Seems to just skip right over it. But, if i go onto the computer and manually change those perms, everything works fine. So, my question is, how to get KBOX to change the perms on that plist file so it will load?
  • I think you need to use launchd instead of launchagents
    http://superuser.com/questions/36087/how-do-i-run-a-launchd-command-as-root
  • found a partial fix. I can change the perms on the file beforehand, zip it and then move it with the script. The perms hold during the move. The problem now is that KBOX won't load the plist file with the launchctl command.
  • Could you post your kace script?
    You might also try running the "stop" and "unload" commands before attempting to do the load
  • Also try replacing the launchctl with launchd
  • When I try to use launchd, it gives the following error: This program is not meant to be run directly.

    # The beginning part of the script runs the Symantec Removal tool script.
    # This part is for the plist
    # Unzip file
    /usr/bin/ditto -x -k --rsrc "/Library/Application Support/Dell/KACE/data/scripts/106/com.syminstall.Custom.plist.zip" "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder"

    # Move file that already has permissions set
    /bin/mv "/Library/Application Support/Dell/KACE/data/scripts/106/ComInstallPlistFolder/com.syminstall.Custom.plist" "/Library/LaunchAgents/"

    # Load plist
    /bin/launchctl load -F "/Library/LaunchAgents/com.syminstall.Custom.plist"

    # Restart the machine

    ###########################################################
    # This is the script that is supposed to run at load

    #!/bin/bash

    osascript -e 'tell app "Finder" to activate'

    osascript -e 'tell app "Finder" to display dialog "Symantec is installing now. Please wait. Your computer will restart when the install is completed." buttons {"OK"} default button 1 with icon 2'


    /usr/sbin/installer -pkg "/Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder/SymantecEndpointProtection.pkg" -target /

    /bin/launchctl stop com.syminstall.Custom

    /bin/launchctl unload /Library/LaunchAgents/com.syminstall.Custom.plist
    /bin/rm/ "/Library/LaunchDaemons/edu.ecu.InstallSym.plist"

    /bin/rm -rf "/Library/Application Support/Dell/KACE/data/scripts/106/"

    shutdown -r now
  • This is my plist flie:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.syminstall.Custom.plist</string>
    <key>ProgramArguments</key>
    <array>
    <string>/Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder/InstallSym.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>
  • I am checking with a Apple Genuis, will let you know his input
    • Nothing really looks out of place to me
  • Browse to the 106 folder and is the shell script and pkg file there, Let eliminated a transfer issue that one of the files is missing, you will have to do this as the install starts since it deletes this folder after.
    • Just a side note but KBOX isn't deleting the folder after it runs the script. I had to add an rm command to do that.
  • They are there. I opened the folder and watched as it downloaded and unzipped the files.
  • good I have sometimes seen one is missing, this helps eliminate the k1000 is the problem, just the scripting. Sorry I saw the RM and thought kace put it in, good housekeeping! Should hear back this morning, I will ping him when he shows up on my google talk.
  • did run into a couple of simular threads and they solved it by putting all the install files in the same folder, it looks like your install shell is in /Library/Application Support/Dell/KACE/data/scripts/106/InstallSymFolder and the package is in /Library/Application Support/Dell/KACE/data/scripts/106/SymantecEndpointProtectionFolder, try changing your deployment so everything is in one folder

    Did find a doc on Symantec's site that mentions a silent install fails on 10.7 because java was not already present ,do not know if that is related to your problem.
    • I will try putting all files into one folder tomorrow. This is happening on a X.6.8 machine so hopefully the java isn't an issue. Thanks for looking! ;)
    • Placing it all into one folder has worked. Great idea! Thank you.
  • cool, mark this as answered and put the solution in to earn some extra ninja points
Please log in to comment

Answers

2

Are you using the "run as" option in an online script to provide a user that has sudo on the system? If not, that's where I'd start.

Enabling debug and pushing the script again may give you more information as well:

  1. Open Terminal by going to ‘Applications > Utilities.
  2. Go to ‘cd Library/Application\ Support/Dell/KACE/bin’
  3. Execute: sudo ./AMPctl stop (provide your password to execute if it asks for this)
  4. Look for the amp.conf file and open it in TextEdit.
  5. Add ‘debug=true’ (all lowercase) on the last line. Save.
  6. Execute: sudo ./AMPctl start

 The log files can be found here: Library/Application\ Support/Dell/KACE/data

 

Answered 08/13/2012 by: jknox
Red Belt

  • Log files report nothing amiss. I figured that would be the case since its related to the Mac OS and not KBOX this time. As for the "run as" option, its the plist that won't load, not the script so I'm not sure how that will straighten things out.
  • Update: After the plist file is moved to Library/LaunchAgents, I can manually load it with sudo launchctl load -F "/Library/LaunchAgents/com.syminstall.Custom.plist" and it works fine. So, KBOX isn't able to run the command to load the file for some reason?
Please log in to comment
Answer this question or Comment on this question for clarity

Share