Shell Scripts not running after Server upgrade to 8.7.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 11:39 AM
I am getting the following message on a number of scripts that are running for different policies. The only change was that the JSS was upgraded to 8.7.1 from 8.6.1 over the weekend.
Script result: /private/tmp/KillForAdobeUpdate.sh: line 1: !DOCTYPE: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 2: html: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 3: head: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 4: meta: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 5: title: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 6: style: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 7: !--
: No such file or directory
/private/tmp/KillForAdobeUpdate.sh: line 8: body{margin:0: command not found
/private/tmp/KillForAdobeUpdate.sh: line 8: font-size:.7em: command not found
/private/tmp/KillForAdobeUpdate.sh: line 8: font-family:Verdana,: command not found
/private/tmp/KillForAdobeUpdate.sh: line 8: background:#EEEEEE: command not found
/private/tmp/KillForAdobeUpdate.sh: line 8: }
: command not found
/private/tmp/KillForAdobeUpdate.sh: line 9: syntax error near unexpected token `}'
/private/tmp/KillForAdobeUpdate.sh: line 9: `fieldset{padding:0 15px 10px 15px;}
'
Has anyone seen this before and what is the fix for it so that scripts can continue to run. Policies re failing because of this. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:15 PM
Looks like your script has been saved as an rtf file instead of a txt file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:23 PM
These are the same files that were on the server prior to the JSS upgrade. I am not sure how the formatting would have changed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:25 PM
Well each line of the error log you posted looks like it's trying to parse HTML instead of text. Someone doing some editing and saving over the top accidentally in rtf format is pretty likely. I've sadly seen this before.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:25 PM
deleted double post
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:30 PM
Thanks franton. I don't think anyone else has saved over the files because the modified date has not changed or anything. Hmph. I will try re-iploading the scripts through Casper Admin and see if that makes a difference.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:32 PM
Before you do that, load the scripts into an editor such as TextWrangler directly off your distribution point. Resave as txt and see if that helps. You're right that the JSS upgrade would not have caused this. I would suspect human error elsewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:41 PM
When I load it off of the distribution point it shows up as a .sh not txt, which is expected (on my mac). Same thing for on the Windows Server it is hosted on.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 12:48 PM
That's not quite what I meant. Shell scripts are normally plain text. However the .sh extension is just that, a file extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 01:20 PM
It is pretty much every shell script on the server that tries to run with this new JSS that is giving me these same errors:
Software Update:
Script result: /private/tmp/SoftwareUpdatePrompt.sh: line 1: !DOCTYPE: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 2: html: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 3: head: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 4: meta: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 5: title: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 6: style: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 7: !--
: No such file or directory
/private/tmp/SoftwareUpdatePrompt.sh: line 8: body{margin:0: command not found
/private/tmp/SoftwareUpdatePrompt.sh: line 8: font-size:.7em: command not found
/private/tmp/SoftwareUpdatePrompt.sh: line 8: font-family:Verdana,: command not found
/private/tmp/SoftwareUpdatePrompt.sh: line 8: background:#EEEEEE: command not found
/private/tmp/SoftwareUpdatePrompt.sh: line 8: }
: command not found
/private/tmp/SoftwareUpdatePrompt.sh: line 9: syntax error near unexpected token `}'
/private/tmp/SoftwareUpdatePrompt.sh: line 9: `fieldset{padding:0 15px 10px 15px;}
'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-01-2013 09:54 PM
are you using http to deliver the scripts or is it mounting the distribution point via afp/smb?
perhaps look at your policy and try forcing it to use afp/smb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-02-2013 04:26 AM
This is a JSS running on a Windows Server 2008 R2. The distribution points are using SMB.
