diff -Nru resolvconf-1.78ubuntu6/bin/resolvconf resolvconf-1.78ubuntu7/bin/resolvconf --- resolvconf-1.78ubuntu6/bin/resolvconf 2017-11-29 19:26:46.000000000 +0100 +++ resolvconf-1.78ubuntu7/bin/resolvconf 2019-05-06 10:39:23.000000000 +0200 @@ -7,7 +7,7 @@ echo_usage() { echo "Usage: resolvconf (-d IFACE|-a IFACE|-u|--enable-updates|--disable-updates|--updates-are-enabled)" ; } -PATH=/sbin:/bin +PATH=/sbin:/bin:/usr/bin MYNAME="${0##*/}" RUN_DIR=/run/resolvconf ENABLE_UPDATES_FLAGFILE="${RUN_DIR}/enable-updates" @@ -53,6 +53,13 @@ mkdir -p "${RUN_DIR}/interface" cd "${RUN_DIR}/interface" +{ +# Make sure that we do not end up with a broken resolv.conf if resolvconf +# is invoked in parallel. +LOCK_WAIT_S=10 +flock -w $LOCK_WAIT_S 9 || + { report_err "Run lock held by another process for longer than $LOCK_WAIT_S seconds"; exit 1; } + update_and_exit() { rm -f "$POSTPONED_UPDATE_FLAGFILE" @@ -169,3 +176,5 @@ # Don't reach here exit 99 + +} 9>"${RUN_DIR}/run-lock" diff -Nru resolvconf-1.78ubuntu6/debian/changelog resolvconf-1.78ubuntu7/debian/changelog --- resolvconf-1.78ubuntu6/debian/changelog 2017-11-29 19:26:46.000000000 +0100 +++ resolvconf-1.78ubuntu7/debian/changelog 2019-05-06 10:39:40.000000000 +0200 @@ -1,3 +1,10 @@ +resolvconf (1.78ubuntu7) xenial; urgency=medium + + * bin/resolvconf: use flock so resolvconf can be called in parallel + safely (LP: #1825194). + + -- Alfonso Sanchez-Beato (email Canonical) Mon, 06 May 2019 10:39:40 +0200 + resolvconf (1.78ubuntu6) xenial; urgency=medium * Read and apply dns information written by initramfs if