SHA256
1
0
forked from pool/systemd

Accepting request 199623 from home:fcrozat:branches:Base:System

- Don't use a trigger to create symlink for sysctl.conf, always run
  the test on %post (bnc#840864).
- Update sysctl-handle-boot-sysctl.conf-kernel_release.patch to
  ensure /boot is mounted before reading /boot/sysctl.conf-*
  (bnc#809420).

OBS-URL: https://build.opensuse.org/request/show/199623
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=438
This commit is contained in:
Cristian Rodríguez 2013-09-18 23:39:18 +00:00 committed by Git OBS Bridge
parent c551e3a4aa
commit eed9df41e0
5 changed files with 41 additions and 18 deletions

View File

@ -10,8 +10,10 @@ configuration), needed by openSUSE (bnc#809420).
units/systemd-sysctl.service.in | 1 +
2 files changed, 9 insertions(+)
--- systemd-206.orig/src/sysctl/sysctl.c
+++ systemd-206/src/sysctl/sysctl.c
Index: systemd-207/src/sysctl/sysctl.c
===================================================================
--- systemd-207.orig/src/sysctl/sysctl.c
+++ systemd-207/src/sysctl/sysctl.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <limits.h>
@ -20,7 +22,7 @@ configuration), needed by openSUSE (bnc#809420).
#include "log.h"
#include "strv.h"
@@ -297,6 +298,13 @@ int main(int argc, char *argv[]) {
@@ -299,6 +300,13 @@ int main(int argc, char *argv[]) {
} else {
_cleanup_strv_free_ char **files = NULL;
char **f;
@ -34,13 +36,16 @@ configuration), needed by openSUSE (bnc#809420).
r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
if (r < 0) {
--- systemd-206.orig/units/systemd-sysctl.service.in
+++ systemd-206/units/systemd-sysctl.service.in
@@ -20,6 +20,7 @@ ConditionDirectoryNotEmpty=|/usr/lib/sys
Index: systemd-207/units/systemd-sysctl.service.in
===================================================================
--- systemd-207.orig/units/systemd-sysctl.service.in
+++ systemd-207/units/systemd-sysctl.service.in
@@ -19,6 +19,8 @@ ConditionDirectoryNotEmpty=|/usr/lib/sys
ConditionDirectoryNotEmpty=|/usr/local/lib/sysctl.d
ConditionDirectoryNotEmpty=|/etc/sysctl.d
ConditionDirectoryNotEmpty=|/run/sysctl.d
+ConditionPathExistsGlob=|/boot/sysctl.conf-*
+RequiresMountsFor=/boot
[Service]
Type=oneshot

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Sep 18 12:05:47 UTC 2013 - fcrozat@suse.com
- Don't use a trigger to create symlink for sysctl.conf, always run
the test on %post (bnc#840864).
- Update sysctl-handle-boot-sysctl.conf-kernel_release.patch to
ensure /boot is mounted before reading /boot/sysctl.conf-*
(bnc#809420).
-------------------------------------------------------------------
Mon Sep 16 17:41:24 UTC 2013 - crrodriguez@opensuse.org

View File

@ -651,6 +651,12 @@ if [ "$1" -eq 1 ]; then
remote-fs.target >/dev/null 2>&1 || :
fi
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%triggerpostun -- systemd < 194
# migrate any symlink which may refer to the old path
for f in $(find /etc/systemd/system -type l -xtype l); do
@ -658,12 +664,6 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
[ -f "$new_target" ] && ln -s -f $new_target $f || :
done
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Sep 18 12:05:47 UTC 2013 - fcrozat@suse.com
- Don't use a trigger to create symlink for sysctl.conf, always run
the test on %post (bnc#840864).
- Update sysctl-handle-boot-sysctl.conf-kernel_release.patch to
ensure /boot is mounted before reading /boot/sysctl.conf-*
(bnc#809420).
-------------------------------------------------------------------
Mon Sep 16 17:41:24 UTC 2013 - crrodriguez@opensuse.org

View File

@ -646,6 +646,12 @@ if [ "$1" -eq 1 ]; then
remote-fs.target >/dev/null 2>&1 || :
fi
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%triggerpostun -- systemd < 194
# migrate any symlink which may refer to the old path
for f in $(find /etc/systemd/system -type l -xtype l); do
@ -653,12 +659,6 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
[ -f "$new_target" ] && ln -s -f $new_target $f || :
done
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then