Code:
freenas:~# cd /root
freenas:~# fetch -o /root/sab.sh "https://sourceforge.net/apps/phpbb/freenas/download/file.php?id=1188"
/root/sab.sh 100% of 2120 B 480 kBps
freenas:~# chmod 0555 sab.sh
freenas:~# ./sab.sh
./sab.sh: Exec format error. Binary file not executable.
Clean install FreeNAS 0.7.1. I am using notepad++ on a windows 7 box to create this script and doing the Edit->EOL Conversions->Convert to Unix format. Then upload it the forums and download it from the web to my freenas box using fetch to download it.
If I transfer the same file over using WinSCP locally then i can chmod it and execute it.
When I fetch it seems to add some bogus data to the beginning of the file.
Been trying to figure this out for hours. Any ideas? Its like its downloading it in the wrong mode... I even tried zipping it, uploading it, downloading it, and still not success.
Any ideas? Alternative to fetch?
~d