Update to 0.06:

- added new macros: 
  + %nagios_user_group_add
  + %nagios_command_user_group_add
  to make it easier to have the same useradd/groupadd invocations 
  in all packages

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/nagios-rpm-macros?expand=0&rev=27
This commit is contained in:
Lars Vogdt 2013-01-01 14:57:33 +00:00 committed by Git OBS Bridge
parent 6afa006f10
commit d8fdb119cc
3 changed files with 26 additions and 2 deletions

View File

@ -51,4 +51,18 @@
# Group, that can execute commands via %{nagios_command_file}
%nagios_command_group nagcmd
# Add Nagios user and groups
%nagios_user_group_add() \
/usr/sbin/groupadd -r %{nagios_group} 2>/dev/null || :\
/usr/sbin/useradd -r -g %{nagios_group} -d %{nagios_localstatedir} -s /bin/false -c "User for Nagios" %{nagios_user} 2>/dev/null || :\
%{nil}
%nagios_command_user_group_add() \
/usr/sbin/groupadd -r %{nagios_command_group} 2>/dev/null || :\
%if 0%{?suse_version} > 01220 \
/usr/sbin/usermod -a -G %{nagios_command_group} %{nagios_user} || :\
%else \
/usr/sbin/groupmod -A %{nagios_user} %{nagios_command_group} 2>/dev/null || :\
%endif \
%{nil}

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jan 1 14:40:45 UTC 2013 - lars@linux-schulserver.de
Update to 0.06:
- added new macros:
+ %nagios_user_group_add
+ %nagios_command_user_group_add
to make it easier to have the same useradd/groupadd invocations
in all packages
-------------------------------------------------------------------
Fri Aug 17 15:02:35 UTC 2012 - thardeck@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package nagios-rpm-macros
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -20,7 +20,7 @@ Name: nagios-rpm-macros
Summary: RPM Macros for Nagios based packages
License: BSD-3-Clause
Group: System/Monitoring
Version: 0.05
Version: 0.06
Release: 0
Url: http://en.opensuse.org/Nagios
Source0: macros.nagios