Accepting request 846969 from home:okurz:branches:Base:System

Fix package description mention of 'systemd-presets-common-SUSE'; Fix coding style

OBS-URL: https://build.opensuse.org/request/show/846969
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-presets-branding-openSUSE?expand=0&rev=129
This commit is contained in:
Johannes Segitz 2020-11-19 15:58:43 +00:00 committed by Git OBS Bridge
parent 1742eba7b0
commit 60ab37b1bd
2 changed files with 26 additions and 21 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Nov 8 19:10:14 UTC 2020 - Oliver Kurz <okurz@suse.com>
- Fix package description mention of 'systemd-presets-common-SUSE'
-------------------------------------------------------------------
Tue Jun 11 12:44:15 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package systemd-presets-branding-openSUSE
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -45,7 +45,7 @@ Default presets for systemd on openSUSE distribution.
These are the openSUSE specific presets. The default
presets needed for all SUSE based distributions can be
found in systemd-presets-branding-common-SUSE.
found in systemd-presets-common-SUSE.
%prep
%setup -q -T -c
@ -62,33 +62,33 @@ install -m644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/90-de
%pre
# On initial installation, branding-preset-states does not yet exist,
# which is why we also check for the file to be present/executable
if [ $1 -gt 1 -a -x %{_prefix}/lib/%{generic_name}/branding-preset-states ] ; then
#
# Save the old state so we can detect which package have its
# default changed later.
#
# Note: the old version of the script is used here.
#
%{_prefix}/lib/%{generic_name}/branding-preset-states save
if [ $1 -gt 1 -a -x %{_prefix}/lib/%{generic_name}/branding-preset-states ]; then
#
# Save the old state so we can detect which package have its
# default changed later.
#
# Note: the old version of the script is used here.
#
%{_prefix}/lib/%{generic_name}/branding-preset-states save
elif [ $1 -eq 1 ]; then
touch /run/rpm-%{name}-preset-all
touch /run/rpm-%{name}-preset-all
fi
%post
if [ $1 -gt 1 ] ; then
#
# Now that the updated presets are installed, find the ones
# that have been changed and apply "systemct preset" on them.
#
%{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes
if [ $1 -gt 1 ]; then
#
# Now that the updated presets are installed, find the ones
# that have been changed and apply "systemct preset" on them.
#
%{_prefix}/lib/%{generic_name}/branding-preset-states apply-changes
fi
%posttrans
if [ -f /run/rpm-%{name}-preset-all ]; then
# Enable all services, which were installed before systemd
# Don't disable services, since this would disable the
# complete network stack.
systemctl preset-all --preset-mode=enable-only
# Enable all services, which were installed before systemd
# Don't disable services, since this would disable the
# complete network stack.
systemctl preset-all --preset-mode=enable-only
fi
rm -f /run/rpm-%{name}-preset-all