Active IQ Unified Manager Discussions

wfa_ocsetup failed with bad interpreter :-o

IMHOTEPSON
6,543 Views

successfully downloaded the file from WFA path (Windows 2008) with wget

tried to execute this and it failed with

[root@dfm opt]# chmod +x wfa_ocsetup.sh

[root@dfm opt]# ./wfa_ocsetup.sh /opt/NTAPdfm/java/

-bash: ./wfa_ocsetup.sh: /bin/sh^M: bad interpreter: Datei oder Verzeichnis nicht gefunden

so if i try to convert the LF to unix, i ran into the next problem


[root@dfm opt]# dos2unix wfa_ocsetup.sh

dos2unix: converting file wfa_ocsetup.sh to UNIX format ...

[root@dfm opt]# ./wfa_ocsetup.sh /opt/NTAPdfm/java/

Verifying  archive integrity...Error in MD5 checksums:  e2525ac8b2295dec74d9694748c5f341 is different from  e7e365e7e9a05cc12f3b0180bda85667

any idea how to fix this ??

1 ACCEPTED SOLUTION

sinhaa
6,542 Views

Hi,

    There is apparently something wrong with the the wfa_ocsetup.sh file attached to the WFA 2.1 server. Its using a dos EOL.

Download the file attached here and try, I think should work fine. This is wfa_ocsetup.sh from WFA 2.0.1 version.

I'll file a bug to get it fixed. We regret your inconvenience.

warm regards,

sinhaa

WFA

NetApp Inc.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

4 REPLIES 4

sinhaa
6,542 Views

-bash: ./wfa_ocsetup.sh: /bin/sh^M: bad interpreter: 

Shows that you have dos line ending files format. dos2unix cmd is a way, but since it didn't work for you, Can you try the following:

1. Open the wfa_ocsetup.sh in vi editor and in the vi Command mode (ESC ) type the following:

:set fileformat=unix

And Save the file using x! or wq!

or Save As with :w wfa_ocsetup_new.sh

2. If (1) didn't work try this:

cat wfa_ocsetup.sh | tr -d '\r' > wfa_ocsetup_new.sh

Now re-run the cmd ./wfa_ocsetup.sh /opt/NTAPdfm/java/

I hope this works

Abhishek Sinha

WFA

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

sinhaa
6,542 Views

Ignore the above solution, it doesn't work. Good thing is I managed to reproduce your problem and but bad thing is in the process screwed my working system too and I haven't figured out how to fix it now. Working on it.

I think its some environment variable with bash which always sets dos EOL. dos2unix changes the md5sum of the file and hence the execution fails.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

sinhaa
6,543 Views

Hi,

    There is apparently something wrong with the the wfa_ocsetup.sh file attached to the WFA 2.1 server. Its using a dos EOL.

Download the file attached here and try, I think should work fine. This is wfa_ocsetup.sh from WFA 2.0.1 version.

I'll file a bug to get it fixed. We regret your inconvenience.

warm regards,

sinhaa

WFA

NetApp Inc.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

IMHOTEPSON
6,542 Views

hi sinhaa, many thanks for this helpful answer and the fully functioning wfa_ocsetup.sh... i think this should be corrected by netapp itself 😮

Public