Add setup-doas improvements

This commit is contained in:
0x1eef 2024-08-17 18:11:06 -03:00
parent 0b5e414d2c
commit c68eebf4a5
2 changed files with 11 additions and 5 deletions

View file

@ -16,9 +16,12 @@ sharedir="${localbase}"/share/sourcezap
# main
src="${sharedir}"/doas.conf
dest="${localbase}"/etc/doas.conf
if grep -Fq "$(cat "${src}")" "${dest}"; then
printok "doas.conf is up to date"
else
cat "${src}" |
while read -r line; do
if grep -q "${line}" "${dest}"; then
continue
fi
cat "${src}" >> "${dest}"
printok "${dest} updated"
fi
printok "modified ${dest}"
break
done

View file

@ -1,5 +1,8 @@
* vNEXT
** Add 'setup/setup-doas' improvements
More likely to do what's expected, but blind spots still exist
** Add 'sourcezap setup', 'sourcezap teardown'
Replaces and enhances 'setup-sourcezap'