Shell Scripts not running after Server upgrade to 8.7.1

antoinekinch
New Contributor III

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!

11 REPLIES 11

franton
Valued Contributor III

Looks like your script has been saved as an rtf file instead of a txt file.

antoinekinch
New Contributor III

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.

franton
Valued Contributor III

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.

franton
Valued Contributor III

deleted double post

antoinekinch
New Contributor III

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.

franton
Valued Contributor III

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.

antoinekinch
New Contributor III

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.

franton
Valued Contributor III

That's not quite what I meant. Shell scripts are normally plain text. However the .sh extension is just that, a file extension.

antoinekinch
New Contributor III

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;} '

calum_carey
Contributor

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

antoinekinch
New Contributor III

This is a JSS running on a Windows Server 2008 R2. The distribution points are using SMB.