Postdownload Script Drivers
-
Server
- FOG Version: 1.3.4
- OS: Ubuntu Server 16.10 amd64
Client
- Service Version:
- OS: Windows 7 x64
Description
Hello,
I am trying to follow a couple threads regarding installing drivers after post image deployment.
Such as:
https://forums.fogproject.org/topic/4278/utilizing-postscripts-rename-joindomain-drivers-snapins/21?page=2
Examined and tried a couple of the scripts in this thread and I seemed to be getting:/images/postdownloadscripts/fog.postdownload: line 2: syntax error near unexpected token ‘$‘in/r’’
/images/postdownloadscripts/fog.postdownload: line 2: 'case $osid in/images/postdownloadscripts/fog.postdownload: line 19: syntax error near unexpcted token ‘fi’
/images/postdownloadscripts/fog.postdownload: line 19: ‘fi’
(I have checked the text file to see if there are any spaces at the end of the file) this is the main error message I get when I try scripts shown in threads listedAnd:
https://forums.fogproject.org/topic/7391/deploying-a-single-golden-image-to-different-hardware-with-fog/4
Pasted the script in step 3 into the fog.postdownload script and gets:/images/postdownloadscripts/fog.postdownload: line 3: $‘\r’: command not found
/images/postdownloadscripts/fog.postdownload: line 46: syntax error: unexpected end of fileAre all these error messages related? Or is something not configured properly, perhaps permissions?
Or is there a better way of putting drivers into a deployed image so it is automated/detected by the model of the PC?Any assistance is greatly appreciated!
Kind regards
-
@Arrowtron said in Postdownload Script Drivers:
$’\r’
Any time I see that \r complaint in a line, it make me suspect that you copied the script from the web page, pasted it into a windows application (like notepad) and then copied the file to a linux machine. That
\r
then is a MS Windows “thing”. To fix it you may have to load a linux program calleddos2unix
to filter out windowsstuff
from a unix (linux) file.ref: https://www.liquidweb.com/kb/dos2unix-removing-hidden-windows-characters-from-files/
-
In simplicity:
\r\n
(CTRL LF) (Also known ls new lines) is the standard form Windows machines create new lines. Where Linux uses:\n
-
As george1421 said I used dos2linux to sort this issue out when I had it
-
Sorry for late reply, thanks heaps that did the job!
-
Also, with notepad++, you can change the formatting from Windows to Linux, to prevent these kind of issues