Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[installer] Fix variable inside machine.conf caused install.sh error #6600

Merged
merged 4 commits into from
Feb 4, 2021

Commits on Jan 29, 2021

  1. [installer] Fix onie_discovery variable caused install.sh error

    * When the value contains space in machine.conf and does not have
      double quote, "install.sh" can't correctly read it.
    
    * "install.sh" uses dot command(i.e. source) to apply the settings
      in machine.conf. If the value in machine.conf are separated by space
      without double quotes between them, it will return failure when
      install.sh try to source machine.conf.
    
    ```
    machine.conf example:
      ...
      onie_disco_ntpsrv=10.254.141.10 10.254.141.131
      ...
    
    install.sh returns:
      ...
      /tmp/tmp.A7wHuAMSQV/installer/install.sh: 11: /host/machine.conf: 10.254.141.131: not found
    ```
    
    * Add a new function 'read_conf_file' to read the settings from
      machine.conf when the value in machine.conf are separated by space
      without double quotes between them.
    kuanyu99 committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    538dc42 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. [installer] Fix minor bug of install.sh

    * Originally, the script will failed if the line of machine.conf
      is comment line or blank line. After this patch, it can correctly
      handle these type of content.
    kuanyu99 committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    b085c74 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2021

  1. [installer] Handle different type of machine.conf

    Handle following types of line
    * Whole comment line
    * Comment string behind declaration
    * Comment string behind some spaces
    * Blank line
    kuanyu99 committed Feb 2, 2021
    Configuration menu
    Copy the full SHA
    72514f9 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2021

  1. [installer] Add a unit test for read_conf_file function

    * To run this test, `cd` into the tests directory and `./test_read_conf.sh`
    
      If pass, it will return 0 and show "PASS".
      If fail, it will return 1 and show "[ERR] Expect value(x86_64) is not equal
      to input value()".
    kuanyu99 committed Feb 4, 2021
    Configuration menu
    Copy the full SHA
    ec36f85 View commit details
    Browse the repository at this point in the history