diff options
author | davidovski <david@davidovski.xyz> | 2022-06-27 23:08:34 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-06-27 23:08:34 +0100 |
commit | f13e0cac13f90f7f57bce3b26b2e6383de6e4ad2 (patch) | |
tree | 31fe2a493efcc3ec8721b8ae9943a0f938cd3f4d /repo/doas/doas.xibuild | |
parent | e4a392b4e1e547c9569abdd1f08ec51da3dc4562 (diff) |
added qemu
Diffstat (limited to 'repo/doas/doas.xibuild')
-rw-r--r-- | repo/doas/doas.xibuild | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/repo/doas/doas.xibuild b/repo/doas/doas.xibuild index 3e3b4f8..0674962 100644 --- a/repo/doas/doas.xibuild +++ b/repo/doas/doas.xibuild @@ -42,3 +42,37 @@ package() { EOF } +postinstall () { + [ -d /etc/doas.d ] || install -d -m 0750 /etc/doas.d + [ -e /etc/doas.d/doas.conf ] && exit 0 + + cat > /etc/doas.d/doas.conf << EOF +# This file is actually located at /etc/doas.d/doas.conf, and reflects +# the system doas configuration. It may have been migrated from its +# previous location, /etc/doas.conf, automatically. +EOF + + [ -f /etc/doas.conf ] && { + cat /etc/doas.conf >> /etc/doas.d/doas.conf + + cat >> /etc/doas.d/doas.conf << EOF +# Please see /usr/share/doc/doas/doas.conf.example in the doas-doc +# package for configuration examples. +EOF + + # install compatibility symlink + rm -f /etc/doas.conf + ln -sf /etc/doas.d/doas.conf /etc/doas.conf + + # chmod 600 + chmod 600 /etc/doas.d/doas.conf + + cat >&2 << EOF + * Your configuration in /etc/doas.conf was migrated to + * /etc/doas.d/doas.conf and a symlink was installed in its + * place. For more information about the new doas configuration + * directory, consult doas.d(5). +EOF + } || true +} + |