Highlighted
Absent Member.
Absent Member.
3189 views

scripted images and windows CRLF when ZCM10 is installed on Windows

Hi.

I have a big issue with ZCM10.1.1 installed on Windows 2003 when doing
scripted images.

It seems that the script is in "dos" format when downloading it and
Zenworks no longer runs dos2unix on it automatically?

The issue is that for some reason we have windows CRLF chars in the
script and bash can not parse that correctly. If I manually run a
"dos2unix" on zenAdvancedScript everything works just fine.

What to do?

/anders
Labels (2)
0 Likes
10 Replies
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

On Tue, 14 Oct 2008 08:42:37 GMT, Anders Westerberg wrote:

> What to do?


how did you create the script, with which browser? Copy and Paste?
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

With internet explorer 7 (with latest windowsupdate patches) on the
server running ZCM. Internet Explorer is the standard set and all
webgui's need to work with IE.

Have tried both copy and paste and manually writing the script.

As a workaround I do it like this:

tftp $imagingserver -c get bashscript.sh;dos2unix bashscript.sh;sh
bashscript.sh;

this is the scripted image script on one line to avoid crlf.

And bashscript.sh is the real script I want to run with a lot of bash
scripting.

This kinda defeats the purpose of managing everything from a browser for
our techs.

/anders

Marcus Breiden wrote:
> On Tue, 14 Oct 2008 08:42:37 GMT, Anders Westerberg wrote:
>
>> What to do?

>
> how did you create the script, with which browser? Copy and Paste?

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed

Anders Westerberg;1660810 wrote:
With internet explorer 7 (with latest

And bashscript.sh is the real script I want to run with a lot of bash
scripting.


> On Tue, 14 Oct 2008 08:42:37 GMT, Anders Westerberg wrote:
>
>> What to do?

>
> how did you create the script, with which browser? Copy and Paste?


have you tried saving it in unix format using a more advanced text editor (such as the free notepad++ program). I recall a similar issue with ZFD a while ago and loading our script up in and ensuring we saved it in unix (or something along those lines) format did the trick
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

Yes, I even tried a dos2unix on the script before I copy/pasted it into
ZCM. It seems to be IE that adds the CRLF chars so it will not really
matter how I process the code before I paste it with internet explorer.

/anders



dc sbrett wrote:
> Anders Westerberg;1660810 Wrote:
>> With internet explorer 7 (with latest
>>
>> And bashscript.sh is the real script I want to run with a lot of bash
>> scripting.
>>
>>
>>> On Tue, 14 Oct 2008 08:42:37 GMT, Anders Westerberg wrote:
>>>
>>>> What to do?
>>> how did you create the script, with which browser? Copy and

>> Paste?

>
> have you tried saving it in unix format using a more advanced text
> editor (such as the free notepad++ program). I recall a similar issue
> with ZFD a while ago and loading our script up in and ensuring we saved
> it in unix (or something along those lines) format did the trick
>
>
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

On Wed, 15 Oct 2008 13:13:42 GMT, Anders Westerberg wrote:

> It seems to be IE that adds the CRLF chars so it will not really
> matter how I process the code before I paste it with internet explorer.


hmm in this case the question would be how firefox behaves.. nevertheless
IF a a general dos2unix of the script in the image environment fixes this
that should be the way to go..

can you confirm this?
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

Yes, a dos2unix works just fine on the script. Doing this now as a
workaround.

/anders

Marcus Breiden wrote:
> On Wed, 15 Oct 2008 13:13:42 GMT, Anders Westerberg wrote:
>
>> It seems to be IE that adds the CRLF chars so it will not really
>> matter how I process the code before I paste it with internet explorer.

>
> hmm in this case the question would be how firefox behaves.. nevertheless
> IF a a general dos2unix of the script in the image environment fixes this
> that should be the way to go..
>
> can you confirm this?

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

On Wed, 22 Oct 2008 09:32:14 GMT, Anders Westerberg wrote:

> Yes, a dos2unix works just fine on the script. Doing this now as a
> workaround.


ok.. let me see..
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed

My problem is that I have a script file located in the tftp directory.
x.txt

When I tftp the file it adds these caracters at the top of the file.
Using view x.txt command, I see this
<EF><BB><BF>

what happened?

I check the options for tftp, netascii is active. I've tried binary, got the same result.

Am I doing something wrong?

I edited the x.txt file using ultraedit and saving the file as LF/unix termination lines.

Any ideas?

Thanks

Cheers!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed

Never mind, got the ASCII type for saving the file and all is good!

Cheers!
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: scripted images and windows CRLF when ZCM10 is installed on Windows

On Tue, 04 Nov 2008 22:06:06 GMT, ipst13 wrote:

> Never mind, got the ASCII type for saving the file and all is good!


thanks for letting us know
--


Marcus Breiden

If you are asked to email me information please remove the - in my e-mail
address.
The content of this mail is my private and personal opinion.
http://www.didas.de

Marcus Breiden If you are asked to email me information please remove the - in my e-mail address. The content of this mail is my private and personal opinion. http://www.didas.de
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.