Because the state 'nosuchfile' is exactly the same as 'absent', it was
removed with the code connected to it. It's not important if the file
exists or not - because in both cases, it contains no key-value.
Also, the code if the explorer returned 'nosuchfile' was wrong:
Completly overwrite the file with the assumption the file does not exist
is not correct, as it can return for multiple objects of the same file
and therefore, they overwrite themself.
The script generation of the awk script was moved from `files/gen-awk.sh`
to `gencode-remote` because the size not really matters. If the file
does not exist, it will be created by a predefined template via an
here-doc to avoid a big awk-script where it is not needed.
This adds spaces around the delimiter to provide some flexibility than
just do it in the delimiter string directly. It can be set via the
parameter `--delimiter-space`.
Because the difference between the both states is just the comment sign
before it, it was now merged into one folder + symlink to avoid
redundancy. To acomplish the difference, a further parser step was
introduced to execute different print function based on the state (it is
a bit of hard-coded but ok).
This detection tires to somehow inteligent places the new entry at the
end of the section, but tires to not infer with existing comments for
the section etc.
This detection is not perfect but will work in some cases. Hope it helps
(if someone whats to look at these files after they got edited).
This currently only applies to the `present` state, but not to the
`commented` state. This will be changed somehow when both scripts will
be unifed cause of there great similarities.
This buffer gives the ability to look a bit longer into the past than
just a single line. This is helpfull to get a bigger context when
fiddling around comments. This also erases the need of
`lastlinepopulated` as there is something in the pipe or nothing.
Initial body of the __ini_value. It contains two awk-scripts: to detect
the state that is important to trigger a code generation, and to change
that line to the correct line. It might have problems which is not
matured enoght.
The most difficult points will be the comment detection, as this is a
critical point as you don't know if the user want to have this touched.
This will fix if a package will be upgraded from some extras to all
extras. Previously, it will not work because some dependencies of 'all'
are already installed, so the feature 'all' is already installed.
Now, it will use a list of all extras to iterate over them separatly. This
will result it will never install all extras via `[all]`, but rather
`[foo,bar]`.
As the previous detection took the wrong values, this explorer now
checks if packages for an extra are installed or not. If not, the extra
is not installed.
Based on the information of the explorer, it will install the package
again with the absent extras.
Closes#853, see issue for full description / discussion.
Short summary:
- There was about 6.53% chances of `--renewal-hook` not being applied
- Using --automatic-renewal in one cert and not in another was an error.
- It was not possible to use different hooks for different certificates.
- FreeBSD support was utterly broken.
This is a poor implementation of optional dependencies for pip packages.
It ensures to install them if the package will be installed, but does
not take into account if they must be added/removed after the package is
already installed. Also, it will not be autoremoved, as all dependencies
will not be removed.
sshd config: Produce error if invalid config is generated, fix processing of AuthenticationMethods and AuthorizedKeysFile, document explorer bug
See merge request ungleich-public/cdist!968
Previously, cdist would silently swallow the error (no invalid config file was
generated).
Reason: `set -e` does not exit if a command in a sub-command group fails,
it merely returns with a non-zero exit status.
e.g. the following snippet does not abort the script if sshd -t returns with a
non-zero exit status:
set -e
cmp -s old new || {
# check config file and update it
sshd -t -f new \
&& cat new >old
}
or compressed:
set -e
false || { false && true; }
echo $?
# prints 1