Skip to content
Snippets Groups Projects
Commit 6e08ade3 authored by Henrik Riomar's avatar Henrik Riomar
Browse files

main/doas: fix a migration bug from /etc/doas.conf to /etc/doas.d/doas.conf

If /etc/doas.conf is a symlink from an older install we should not run
the migration code again
parent 169b082f
1 merge request!27031main/doas: fix perms of /etc/doas.d
Pipeline #98793 passed with stages
in 2 minutes and 46 seconds
......@@ -9,11 +9,13 @@ cat << _EOF_ >/etc/doas.d/doas.conf
# previous location, /etc/doas.conf, automatically.
_EOF_
[ -e /etc/doas.conf ] && cat /etc/doas.conf >> /etc/doas.d/doas.conf
[ -e /etc/doas.conf ] || cat << _EOF_ >> /etc/doas.d/doas.conf
if [ -f /etc/doas.conf ]; then
cat /etc/doas.conf >> /etc/doas.d/doas.conf
cat << _EOF_ >> /etc/doas.d/doas.conf
# Please see /usr/share/doc/doas/doas.conf.example in the doas-doc
# package for configuration examples.
_EOF_
fi
# install compatibility symlink
rm -f /etc/doas.conf
......
......@@ -14,11 +14,13 @@ cat << _EOF_ >/etc/doas.d/doas.conf
# previous location, /etc/doas.conf, automatically.
_EOF_
[ -e /etc/doas.conf ] && cat /etc/doas.conf >> /etc/doas.d/doas.conf
[ -e /etc/doas.conf ] || cat << _EOF_ >> /etc/doas.d/doas.conf
if [ -f /etc/doas.conf ]; then
cat /etc/doas.conf >> /etc/doas.d/doas.conf
cat << _EOF_ >> /etc/doas.d/doas.conf
# Please see /usr/share/doc/doas/doas.conf.example in the doas-doc
# package for configuration examples.
_EOF_
fi
# install compatibility symlink
rm -f /etc/doas.conf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment