From 9109af6fe57ef599353d87cbff5224a0daaa8a50 Mon Sep 17 00:00:00 2001 From: William Brown Date: Dec 08 2017 19:09:12 +0000 Subject: Ticket 49449 - Load sysctl values on rpm upgrade. Bug Description: We provide sysctl values. We should apply them on upgrade or installation to prevent a need to reboot. Fix Description: Add a post install script to load the sysctl values from the system as they wolud be on a reboot. Note this may not work in all cases (ie mock, container etc) so we have to mask failures "just in case". https://pagure.io/389-ds-base/issue/49449 Author: wibrown Review by: tbordaz (Thank you!) (cherry picked from commit 4f2207a3bc13a9181a4cadfeeb7819b5c036966e) --- diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index b4c863a..9b1dd21 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -358,6 +358,9 @@ if ! getent passwd $USERNAME >/dev/null ; then fi fi +# Reload our sysctl before we restart (if we can) +sysctl --system &> $output; true + echo looking for instances in %{_sysconfdir}/%{pkgname} > $output 2>&1 || : instbase="%{_sysconfdir}/%{pkgname}" for dir in $instbase/slapd-* ; do