• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Postdownload Script Drivers

Scheduled Pinned Locked Moved Solved
FOG Problems
5
6
2.1k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    Arrowtron
    last edited by Apr 10, 2017, 6:31 AM

    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 listed

    And:
    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 file

    Are 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

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by Apr 10, 2017, 9:56 AM

      @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 called dos2unix to filter out windows stuff from a unix (linux) file.

      ref: https://www.liquidweb.com/kb/dos2unix-removing-hidden-windows-characters-from-files/

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      A 1 Reply Last reply Apr 18, 2017, 3:27 AM Reply Quote 1
      • T
        Tom Elliott
        last edited by Apr 10, 2017, 10:09 AM

        In simplicity:

        \r\n (CTRL LF) (Also known ls new lines) is the standard form Windows machines create new lines. Where Linux uses: \n

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • F
          falko Moderator
          last edited by Apr 10, 2017, 9:30 PM

          As george1421 said I used dos2linux to sort this issue out when I had it

          1 Reply Last reply Reply Quote 0
          • A
            Arrowtron @george1421
            last edited by Apr 18, 2017, 3:27 AM

            @george1421

            Sorry for late reply, thanks heaps that did the job!

            1 Reply Last reply Reply Quote 0
            • F
              Fimlore
              last edited by Apr 19, 2017, 6:59 PM

              Also, with notepad++, you can change the formatting from Windows to Linux, to prevent these kind of issues

              1 Reply Last reply Reply Quote 2
              • 1 / 1
              • First post
                Last post

              165

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project