From 32afea41ba8b7328e252ae97ca32c56f98d42a90 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 03:46:31 +0200 Subject: Adding debian version 3.4.23-0+deb10u1. Signed-off-by: Daniel Baumann --- debian/ip-up.d | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 debian/ip-up.d (limited to 'debian/ip-up.d') diff --git a/debian/ip-up.d b/debian/ip-up.d new file mode 100644 index 0000000..49581b0 --- /dev/null +++ b/debian/ip-up.d @@ -0,0 +1,44 @@ +#!/bin/sh -e +# Called when a new interface comes up +# Written by LaMont Jones + +# don't bother to restart postfix when lo is configured. +if [ "$IFACE" = "lo" ]; then + exit 0 +fi + +# If /usr isn't mounted yet, silently bail. +if [ ! -d /usr/lib/postfix ]; then + exit 0 +fi + +RUNNING="" +# If master is running, force a queue run to unload any mail that is +# hanging around. Yes, sendmail is a symlink... +if [ -f /var/spool/postfix/pid/master.pid ]; then + pid=$(sed 's/ //g' /var/spool/postfix/pid/master.pid) + exe=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* //;s/.*\///') + if [ "X$exe" = "Xmaster" ]; then + RUNNING="y" + fi +fi + +# start or reload Postfix as needed +if [ ! -x /sbin/resolvconf ]; then + f=/etc/resolv.conf + if ! cp $f $(postconf -hx queue_directory)$f 2>/dev/null; then + exit 0 + fi + if [ -n "$RUNNING" ]; then + service postfix reload >/dev/null 2>&1 + fi +fi + +# If master is running, force a queue run to unload any mail that is +# hanging around. Yes, sendmail is a symlink... +if [ -n "$RUNNING" ]; then + if [ -x /usr/sbin/sendmail ]; then + # Don't propagate the exit code on failure; cf. #959864 + /usr/sbin/sendmail -q >/dev/null 2>&1 || true + fi +fi -- cgit v1.2.3