mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-07 05:10:20 +00:00
squid: add nm dispatcher reload hook
This enables the networkmanager dispatcher to reload squid automatically on network changes. This idea is from the Fedora package where they do the same: https://src.fedoraproject.org/rpms/squid/blob/rawhide/f/squid.spec#_207 Signed-off-by: Patrick Wicki <patrick.wicki@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$2" in
|
||||
up|down|vpn-up|vpn-down)
|
||||
systemctl -q reload squid.service || :
|
||||
;;
|
||||
esac
|
||||
@@ -20,6 +20,7 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${BPN}-${PV}.tar.bz2
|
||||
file://volatiles.03_squid \
|
||||
file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \
|
||||
file://0002-squid-make-squid-conf-tests-run-on-target-device.patch \
|
||||
file://squid.nm \
|
||||
"
|
||||
|
||||
SRC_URI:remove:toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch"
|
||||
@@ -49,6 +50,8 @@ PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-c
|
||||
PACKAGECONFIG[esi] = "--enable-esi,--disable-esi,expat libxml2"
|
||||
PACKAGECONFIG[ssl] = "--with-openssl=yes,--with-openssl=no,openssl"
|
||||
|
||||
PACKAGES =+ "${PN}-networkmanager"
|
||||
|
||||
BASIC_AUTH = "DB SASL LDAP"
|
||||
|
||||
DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
|
||||
@@ -109,11 +112,16 @@ do_install:append() {
|
||||
|
||||
rmdir "${D}${localstatedir}/log/${BPN}"
|
||||
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}/log"
|
||||
|
||||
# Install NetworkManager dispatcher reload hooks
|
||||
install -d ${D}${libdir}/NetworkManager/dispatcher.d
|
||||
install -m 0755 ${WORKDIR}/squid.nm ${D}${libdir}/NetworkManager/dispatcher.d/20-squid
|
||||
}
|
||||
|
||||
FILES:${PN} += "${libdir} ${datadir}/errors ${datadir}/icons"
|
||||
FILES:${PN}-dbg += "/usr/src/debug"
|
||||
FILES:${PN}-doc += "${datadir}/*.txt"
|
||||
FILES:${PN}-networkmanager = "${libdir}/NetworkManager/dispatcher.d"
|
||||
|
||||
RDEPENDS:${PN} += "perl"
|
||||
RDEPENDS:${PN}-ptest += "perl make"
|
||||
|
||||
Reference in New Issue
Block a user