Signed-off-by: Steve Youngs <steve@steveyoungs.com>
####
#
-# To allow pkgusr users to run ldconfig as root.
+# To allow pkgusr users to run ldconfig and mandb as root.
#
####
Cmnd_Alias LDCONFIG = /usr/sbin/ldconfig *
+Cmnd_Alias MANDB = /usr/bin/mandb
User_Alias PKGUSRS = %install
Defaults:PKGUSRS !lecture, !authenticate
-PKGUSRS ALL = LDCONFIG
+PKGUSRS ALL = LDCONFIG, MANDB
--- /dev/null
+#!/bin/bash
+# Copyright © 2021 Steve Youngs All rights reserved.
+# SPDX-License-Identifer: BSD-3-Clause
+
+####
+#
+# Call mandb with sudo to update the system db
+#
+####
+
+[[ -x $(type -p sudo) ]] && sudo /usr/bin/mandb -q
+
+# Local variables:
+# sh-basic-offset: 4
+# End: