1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
--- a/backends/lsb
+++ b/backends/lsb
@@ -32,7 +32,12 @@
}
munge_deps() {
- self=$(local -; set +o noglob; find /etc/insserv.conf* -type f -exec awk "/$(basename "$lsb_init_script")/ {print \$1}" '{}' ';')
+ # In normal usage insserv will be installed. However, to pass autopkgtests
+ # on Debian infra the dependency on sysv-rc (pulling in insserv) has been
+ # reduced to Recommends, so we need to handle missing /etc/insserv.conf gracefully.
+ self=$(set +o noglob
+ { [ ! -f /etc/insserv.conf ] && [ ! -d /etc/insserv.conf.d ] ; } ||
+ find /etc/insserv.conf* -type f -exec awk "/$(basename "$lsb_init_script")/ {print \$1}" '{}' ';')
for key in Requires Wants After Before; do
for dep in ${depends[$key]:-}; do
if [[ "$dep" == "$self" ]] ; then
|