Commit Graph

28 Commits

Author SHA1 Message Date
Dennis Camera fb19f34266 [type/__ssh_authorized_key] Only grep if file exists 2021-03-09 21:15:26 +01:00
evilham 6d502f737a [__ssh_authorizedkey{,s}] Improve documentation. 2020-05-18 18:37:16 +02:00
sideeffect42 a34060d703 Improve OpenBSD support (#720)
* [type/__timezone] Whitelist OpenBSD

OpenBSD ships /etc/localtime and /usr/share/zoneinfo by default.

* [type/__postgres_{database,role}] Add explorer support for OpenBSD

On OpenBSD the "postgres" user is called "_postgresql".
The "postgres" database must me specifically specified as it differs from the
user name.

* [type/__postgres_{database,role}] Add gencode support for OpenBSD

On OpenBSD the "postgres" user is called "_postgresql".
The "postgres" database must me specifically specified when using psql as it
differs from the user name.

* [type/__postgres_role] Query DB if role exists instead of screen scaping

* [type/__postgres_database] Query DB if database exists instead

* [type/__postgres_{database,role}] Add user for NetBSD

* [type/__postgres_extension] Add support for OpenBSD and NetBSD

* [__ssh_authorized_key] Add OpenBSD support to entry explorer

Make sure to adhere to re_format(7) for OpenBSD compatibility.

https://man.openbsd.org/re_format.7

* [type/__start_on_boot] Add support for OpenBSD
2018-11-03 19:17:56 +01:00
Darko Poljak 638ddd95d6 Fix problems found by sellcheck in type explorers. 2018-10-07 19:41:44 +02:00
Darko Poljak a9f27beb98 Fix SC1117. 2018-10-07 10:22:11 +02:00
Darko Poljak 644ec85d80 Fix SC2162. 2018-10-05 12:50:01 +02:00
Jonas Weber ae7ccc5995 Fix SC2086 on all scripts
Relevant documentation: https://github.com/koalaman/shellcheck/wiki/SC2086

relates to: #540

This commit addresses 241 separate cases of missing quotes around
variables.
2018-10-04 19:45:22 +02:00
Darko Poljak 44acfcdd12 Fix SC2002 2018-10-03 14:12:07 +02:00
tom 5eb478da95 Add messaging to __ssh_authorized_key. (#590) 2017-10-31 07:56:25 +01:00
Darko Poljak 8883196efb Bugfix for: __ssh_authorized_keys overwrites existing keys #577 (#579)
* Fix a bug where invalid key removes all file entries.

* __ssh_authorized_key: add key validation.
2017-09-17 08:13:05 +02:00
Darko Poljak eae399b025 Fix removing ssh key that is last one in the file. 2017-08-30 09:27:06 +02:00
Darko Poljak 62378dc8b9 Change shebang to #!/bin/sh -e 2017-06-28 13:19:32 +02:00
Darko Poljak df566f4ff8 GPLv3+ relicensing. 2016-08-10 18:15:54 +02:00
Darko Poljak 0dfb4aee73 sphinx> ':manpage:' -> ':strong:' 2016-06-30 15:13:33 +02:00
Darko Poljak f98208f250 Make man pages SEE ALSO by convention. Improve docs building. 2016-06-30 12:09:07 +02:00
Darko Poljak 51c94e9e82 Restructure and fix and improve docs and manpages. 2016-06-29 07:48:34 +02:00
Darko Poljak b89077f9a5 Better sphinx manpage ext. Add custom dotman Makefile target for custom .cdist directory. 2016-06-23 16:08:59 +02:00
Darko Poljak cf32b669ff Write sphinx rst docs. 2016-05-22 17:16:03 +02:00
Steven Armstrong 28027f4261 dont fail just because grep in subshell exited non-zero
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-10-22 14:32:32 +02:00
Steven Armstrong 41782cb107 workaround special case where the desired key was already present more then once in target file
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-09-29 14:47:25 +02:00
Steven Armstrong 4c52b10f93 maybe better define variable _before_ using it
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-09-29 10:57:27 +02:00
Steven Armstrong 4125dfaab0 them files should end in newline stupid
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-09-29 10:46:00 +02:00
Steven Armstrong b17a1f0edb removing and adding keys must be atomic
If we delegate this to multiple seprarate objects (e.g. using __line) and the
config run is interrupted after applying only some of them we may leave the
target in some random state.
We may have even locked ourself out of the target.

So remove and add keys ourself so either none are all changes are
applied.

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-09-27 11:40:06 +02:00
Steven Armstrong 68586a0c3d new type to manage a single ssh authorized_key entry
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2014-09-25 16:23:38 +02:00
Nico Schottelius f37f3d201c __ssh_authorized_key has been superseeded by __ssh_authorized_keys
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-30 14:41:47 +01:00
Nico Schottelius 2cfa046cdd indentions, whitespace
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 17:57:47 +01:00
Steven Armstrong 6adb20b829 __ssh_authorized_key: /installed/present/
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-07 16:57:31 +01:00
Nico Schottelius 63573a9797 make package_data work
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-29 22:50:27 +01:00