2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00
Miro aaacca80cd Fix merging in xdcpmerge.sh (#4328)
* Fixes in xdcpmerge.sh

Two fixes:
1. The grep pattern when finding duplicate usernames is missing ":" at the end. So, for example user "test" would also match "test2, etc.". Adding the ":" delimiter fixes the issue.
2. Another issue happens when the file to be merged is a superset of the files on the nodes. For example, if a new user is added and entire passwd file (that is otherwise identical) is sent to be merged. In this case, the $filebackup.nodups file, i.e. the original file with duplicates removed, becomes empty and the condition "if [ -s "$filebackup.nodups" ]" does not execute. Then the merged file ends up being original file with the merge file fully appended, clearly not what was intended.

This is solved by changing the condition to check for file existence "-a" rather then for size. Additionally, I also turn the logic around so that the duplicates are removed from the merge file and then added to the original file. I think this makes logic a bit cleaner and also ensures that existing entries are not reordered or changed in any way.

* Streamlining previous commit

Adjustment to previous commit, streamlining and simplifying logic. Once $mergefile.nodups is created, just concatenate it the original file.

* Update to xdcpmerge

No need to copy $filebackup to $curfile, they are the same.
2017-11-26 20:20:49 -06:00
2017-11-17 01:46:13 -06:00
2017-03-14 11:27:56 -04:00
2017-11-03 10:57:29 +08:00
2017-11-03 10:52:49 +08:00

xCAT
----

xCAT is a toolkit for the deployment and administration of clusters.

Documentation
-------------

xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/

|docs_latest| |docs_2138| |docs_2137| |docs_2136| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212|

Open Source License
-------------------

xCAT is made available as open source software under the EPL license:
http://www.opensource.org/licenses/eclipse-1.0.php

Developers
----------

Developers and prospective contributors are encouraged to read the `Developers Guide <http://xcat-docs.readthedocs.io/en/latest/developers/>`_
In particular the `GitHub <http://xcat-docs.readthedocs.io/en/latest/developers/github/>`_ related subsection.

.. |docs_2138| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.8
    :alt: 2.13.8 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.8/

.. |docs_2137| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.7
    :alt: 2.13.7 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.7/
    
.. |docs_2136| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.6
    :alt: 2.13.6 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.6/

.. |docs_2135| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.5
    :alt: 2.13.5 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.5/

.. |docs_2134| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.4
    :alt: 2.13.4 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.4/

.. |docs_2133| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.3
    :alt: 2.13.3 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.3/
    
.. |docs_2132| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.2
    :alt: 2.13.2 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.2/

.. |docs_2131| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.1
    :alt: 2.13.1 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.1/

.. |docs_2130| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.0
    :alt: 2.13.0 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.13.0/
    
.. |docs_212| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12
    :alt: 2.12 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.12/
        
.. |docs_211| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.11
    :alt: 2.11 documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/2.11/
    
.. |docs_latest| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=latest
    :alt: Latest documentation status
    :scale: 100%
    :target: http://xcat-docs.readthedocs.io/en/latest/
Description
No description provided
Readme EPL-1.0 230 MiB
Languages
Perl 78.5%
Shell 11.4%
JavaScript 7.1%
Python 1.8%
PHP 0.4%
Other 0.4%