Move scripts/GRMLBASE/40-deborphan towards DEBORPHAN class as file 10-whitelist
[grml-live.git] / etc / grml / fai / config / scripts / DEBORPHAN / 10-whitelist
diff --git a/etc/grml/fai/config/scripts/DEBORPHAN/10-whitelist b/etc/grml/fai/config/scripts/DEBORPHAN/10-whitelist
new file mode 100755 (executable)
index 0000000..aa52ab0
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+# Filename:      ${GRML_FAI_CONFIG}/config/scripts/DEBORPHAN/10-whitelist
+# Purpose:       whitelist packages to keep with deborphan
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2 or any later version.
+################################################################################
+
+set -u
+set -e
+
+# workaround for dnsutils transitional package, we can drop this as soon as the
+# bind9-dnsutils package is available in all our supported Debian releases
+if [[ -r "${target}/usr/share/doc/dnsutils" ]] && [ -x "${target}/usr/bin/deborphan" ] ; then
+  $ROOTCMD deborphan --add-keep dnsutils || /bin/true
+fi
+
+## END OF FILE #################################################################
+# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2