2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-27 14:03:25 +00:00

8 Commits

Author SHA1 Message Date
GONG Jie
2124252630 Remove trailing spaces in file xCAT-server/share/xcat/scripts/xdcpmerge.sh 2017-12-31 23:59:59 +00:00
Bin Xu
961108c53b updatenode MERGE mode does not support update an existing entry 2018-03-26 18:06:49 +08: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
Bin Xu
2991ec1e59 Fix 3749, handle '+' and '-' in id when merging /etc/passwd (#3771)
* Fix 3749, handle '+' and '-' in id when merging /etc/passwd

* Add some comments
2017-08-25 15:13:51 +08:00
GONG Jie
ca4437270a Fix sourceforge bug #4691 Use a consistent log tag for xCAT log 2015-07-01 18:03:36 +08:00
lissav
638838010c Left in bash so something working. Having trouble with the comm call in shell
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13378 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-07-31 16:24:37 +00:00
lissav
df23c21198 more testing
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13352 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-07-26 15:20:49 +00:00
lissav
68736e5789 merge script to be run by xdcp to support the MERGE function, more testing needed
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13344 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
2012-07-25 16:59:07 +00:00