Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request 'sysusers: get rid of an unneccesary id line' (#5) from Dudemanguy/opensysusers:posix into posix sysusers: get rid of an unneccesary id line This line is actually bad and will cause the creation of some users to fail. The reason is simply because id -g arg can't take an argument of a group that does not have a user. So it will fail here for many conf files. This line doesn't really appear to have any particular purpose either since add_user will check if ${id} is equal to "-" and handle that logic for us. Just get rid of it altogether. Merge pull request 'sysusers: process final line if it fails on read' (#4) from Dudemanguy/opensysusers:posix into posix sysusers: process final line if it fails on read If the last line lacks an EOL/newline, read will return false thus exiting the loop. However, the line will be a non-zero string. So just add an extra check for this case and parse the string. Merge pull request 'remove separate {,open}sysusers command and common.sh' (#2) from Dudemanguy/opensysusers:posix into posix remove separate {,open}sysusers command and common.sh remove all arguments if command is invoked as opensysusers to force the simple non-systemd-sysusers implementation codepath reorganize to deduplicate lots of code replace the one remaining use of get_conf_files and get_conf_paths with a much shorter inlined equivalent, remove those functions make POSIX sh compatible remove array usage remove local builtin usage remove herestring usage remove string indexing usage use shellcheck directive to specify source file locations use manual shell option processing instead of getopt use : to delimit file names in list instead of space like PATH check command results directly instead of checking $? make sed usage POSIX compatible and more concise use case to check variables against multiple strings instead of a series of ifs replace incorrect usages of continue with return where appropriate remove unused library functions replace getent usage with more portable methods of checking for groups/users Signed-off-by: Ethan Sommer <e5ten.arch at gmail.com> Signed-off-by: artoo <artoo@artixlinux.org> Co-authored-by: Dudemanguy <dudemanguy@artixlinux.org> Co-authored-by: Ethan Sommer <e5ten@artixlinux.org>
- Loading branch information