This commit is contained in:
parent
ddff3f294b
commit
f3f84f181a
2 changed files with 23 additions and 9 deletions
|
@ -17,12 +17,21 @@ sharedir="${localbase}"/share/sourcezap
|
||||||
src="${sharedir}"/doas.conf
|
src="${sharedir}"/doas.conf
|
||||||
dest="${localbase}"/etc/doas.conf
|
dest="${localbase}"/etc/doas.conf
|
||||||
# shellcheck disable=SC2002
|
# shellcheck disable=SC2002
|
||||||
cat "${src}" |
|
if [ -e "${dest}" ]; then
|
||||||
while read -r line; do
|
cat "${src}" |
|
||||||
|
while read -r line; do
|
||||||
if grep -q "${line}" "${dest}"; then
|
if grep -q "${line}" "${dest}"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat "${src}" >> "${dest}"
|
cat "${src}" >> "${dest}"
|
||||||
printok "modified ${dest}"
|
printok "modified ${dest}"
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
install -m "u=rw,go=" \
|
||||||
|
-o root \
|
||||||
|
-g wheel \
|
||||||
|
"${src}" \
|
||||||
|
"${localbase}"/etc
|
||||||
|
printok "installed ${dest}"
|
||||||
|
fi
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
|
|
||||||
** vNEXT
|
** vNEXT
|
||||||
|
|
||||||
|
**** Try to install ~doas.conf~ when it does not exist
|
||||||
|
When ~${PREFIX}/etc/doas.conf~ does not exist the ~setup-doas~
|
||||||
|
script will try to install ~/usr/local/etc/doas.conf~ with
|
||||||
|
~root:wheel~ as the owner, and with ~u=rw,go=~ as the filemode
|
||||||
|
|
||||||
**** Log when ~sourcezap rm~ completes successfully
|
**** Log when ~sourcezap rm~ completes successfully
|
||||||
Similar to other commands, log when the ~sourcezap rm~ command
|
Similar to other commands, log when the ~sourcezap rm~ command
|
||||||
completes successfully
|
completes successfully
|
||||||
|
|
Loading…
Reference in a new issue