packages (corosync-1_4): corosync/corosync-notifyd.init, corosync/corosync-...
jajcus
jajcus at pld-linux.org
Wed Jul 4 21:36:30 CEST 2012
Author: jajcus Date: Wed Jul 4 19:36:30 2012 GMT
Module: packages Tag: corosync-1_4
---- Log message:
- systemd unit files added
- corosync-notifyd init script updated - typos and 'sysconfig' file format
compatible with systemd service
- Release: 2.2
---- Files affected:
packages/corosync:
corosync-notifyd.init (1.1 -> 1.1.2.1) , corosync-notifyd.sysconfig (1.1 -> 1.1.2.1) , corosync.spec (1.18.2.3 -> 1.18.2.4) , corosync-notifyd.service (NONE -> 1.1.2.1) (NEW), corosync.service (NONE -> 1.1.2.1) (NEW), corosync.target (NONE -> 1.1.2.1) (NEW)
---- Diffs:
================================================================
Index: packages/corosync/corosync-notifyd.init
diff -u packages/corosync/corosync-notifyd.init:1.1 packages/corosync/corosync-notifyd.init:1.1.2.1
--- packages/corosync/corosync-notifyd.init:1.1 Tue Jul 3 23:24:22 2012
+++ packages/corosync/corosync-notifyd.init Wed Jul 4 21:36:24 2012
@@ -2,14 +2,14 @@
#
# corosync-notifyd Corosync Dbus and snmp notifier
#
-# chkconfig: 2345 23 77
+# chkconfig: 2345 22 78
# description: Corosync Dbus and snmp notifier
-# processname: corosync-notifyd-notifyd
+# processname: corosync-notifyd
#
### BEGIN INIT INFO
-# Provides: corosync-notifyd-notifyd
-# Required-Start: $corosync-notifyd $cman
-# Required-Stop: $corosync-notifyd $cman
+# Provides: corosync-notifyd
+# Required-Start: $corosync $cman
+# Required-Stop: $corosync $cman
# Default-Start:
# Default-Stop:
# Short-Description: Starts and stops Corosync Notifier.
@@ -19,9 +19,7 @@
# Source function library
. /etc/rc.d/init.d/functions
-SEND_SNMP_TRAPS=no
-SEND_DBUS_SIGNALS=yes
-LOG_ALL_EVENTS=no
+COROSYNC_NOTIFYD_OPTS="-d"
[ -f /etc/sysconfig/corosync-notifyd ] && . /etc/sysconfig/corosync-notifyd
@@ -41,21 +39,8 @@
return
fi
- local options=""
- if is_yes "$SEND_SNMP_TRAPS" ; then
- options="$options -s"
- fi
- if [ -n "$SNMP_MANAGER" ] ; then
- options="$options -m $SNMP_MANAGER"
- fi
- if is_yes "$SEND_DBUS_SIGNALS" ; then
- options="$options -d"
- fi
- if is_yes "$LOG_ALL_EVENTS" ; then
- options="$options -l"
- fi
msg_starting "Corosync Notifier"
- daemon /usr/sbin/corosync-notifyd "$options"
+ daemon /usr/sbin/corosync-notifyd $COROSYNC_NOTIFYD_OPTS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/corosync-notifyd
}
================================================================
Index: packages/corosync/corosync-notifyd.sysconfig
diff -u packages/corosync/corosync-notifyd.sysconfig:1.1 packages/corosync/corosync-notifyd.sysconfig:1.1.2.1
--- packages/corosync/corosync-notifyd.sysconfig:1.1 Tue Jul 3 23:24:22 2012
+++ packages/corosync/corosync-notifyd.sysconfig Wed Jul 4 21:36:25 2012
@@ -1,12 +1,9 @@
-# Send SNMP traps on all events.
-SEND_SNMP_TRAPS=no
-
-# SNMP Manager IP address (defaults to localhost).
-#SNMP_MANAGER=
-
-# Send DBUS signals on all events.
-SEND_DBUS_SIGNALS=yes
-
-# Log all events.
-LOG_ALL_EVENTS=no
+# corosync-notifyd options
+#
+# -l : Log all events.
+# -s : Send SNMP traps on all events.
+# -m : SNMP Manager IP address (defaults to localhost).
+# -d : Send DBUS signals on all events.
+#
+COROSYNC_NOTIFYD_OPTS="-d"
================================================================
Index: packages/corosync/corosync.spec
diff -u packages/corosync/corosync.spec:1.18.2.3 packages/corosync/corosync.spec:1.18.2.4
--- packages/corosync/corosync.spec:1.18.2.3 Tue Jul 3 23:24:22 2012
+++ packages/corosync/corosync.spec Wed Jul 4 21:36:25 2012
@@ -10,7 +10,7 @@
Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
Name: corosync
Version: 1.4.3
-Release: 2.1
+Release: 2.2
License: BSD
Group: Base
Source0: ftp://ftp:downloads@corosync.org/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
@@ -18,6 +18,9 @@
Source1: %{name}.init
Source2: %{name}-notifyd.init
Source3: %{name}-notifyd.sysconfig
+Source4: %{name}.service
+Source5: %{name}-notifyd.service
+Source6: %{name}.target
Patch0: %{name}-makefile.patch
URL: http://www.corosync.org/
BuildRequires: autoconf >= 2.61
@@ -121,7 +124,7 @@
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
+install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig,%{systemdunitdir}}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
@@ -132,11 +135,14 @@
>$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
+%{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
+
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
-
-%{?with_apidocs:install doc/api/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3}
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+install %{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}-notifyd.service
+install %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.target
%clean
rm -rf $RPM_BUILD_ROOT
@@ -148,6 +154,7 @@
%service %{name}-notifyd restart
%systemd_post %{name}.service
%systemd_post %{name}-notifyd.service
+%systemd_post %{name}.target
%preun
if [ "$1" = "0" ]; then
@@ -158,6 +165,7 @@
fi
%systemd_preun %{name}.service
%systemd_preun %{name}-notifyd.service
+%systemd_preun %{name}.target
%postun
%systemd_reload
@@ -170,6 +178,9 @@
%doc AUTHORS ChangeLog LICENSE README.devmap README.recovery SECURITY TODO conf/corosync.conf.example*
%attr(754,root,root) /etc/rc.d/init.d/corosync
%attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
+%{systemdunitdir}/%{name}.service
+%{systemdunitdir}/%{name}-notifyd.service
+%{systemdunitdir}/%{name}.target
%verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
%dir %{_sysconfdir}/corosync
%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
@@ -296,6 +307,12 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.18.2.4 2012/07/04 19:36:25 jajcus
+- systemd unit files added
+- corosync-notifyd init script updated - typos and 'sysconfig' file format
+ compatible with systemd service
+- Release: 2.2
+
Revision 1.18.2.3 2012/07/03 21:24:22 jajcus
PLD init scripts added
================================================================
Index: packages/corosync/corosync-notifyd.service
diff -u /dev/null packages/corosync/corosync-notifyd.service:1.1.2.1
--- /dev/null Wed Jul 4 21:36:30 2012
+++ packages/corosync/corosync-notifyd.service Wed Jul 4 21:36:24 2012
@@ -0,0 +1,16 @@
+[Unit]
+Description=Corosync Dbus and SNMP notifier
+After=openais.service
+After=corosync.service
+
+[Install]
+WantedBy=corosync.target
+
+[Service]
+Type=simple
+KillMode=process
+SysVStartPriority=22
+Environment=COROSYNC_NOTIFYD_OPTS=-d
+EnvironmentFile=-/etc/sysconfig/corosync-notifyd
+ExecStart=/usr/sbin/corosync-notifyd -f $COROSYNC_NOTIFYD_OPTS
+Restart=on-failure
================================================================
Index: packages/corosync/corosync.service
diff -u /dev/null packages/corosync/corosync.service:1.1.2.1
--- /dev/null Wed Jul 4 21:36:30 2012
+++ packages/corosync/corosync.service Wed Jul 4 21:36:25 2012
@@ -0,0 +1,25 @@
+[Unit]
+Description=Corosync Cluster Engine
+ConditionKernelCommandLine=!nocluster
+Requires=network.target
+After=network.target
+Names=corosync-stack.service
+Conflicts=openais.service
+
+[Install]
+WantedBy=corosync.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/corosync.pid
+KillMode=process
+SysVStartPriority=21
+EnvironmentFile=-/etc/sysconfig/corosync
+ExecStart=/usr/sbin/corosync
+
+# Pacemaker can only exit after all managed services have shut down
+# A HA database could conceivably take even longer than this
+TimeoutSec=30min
+
+# Restart options include: no, on-success, on-failure, on-abort or always
+Restart=on-failure
================================================================
Index: packages/corosync/corosync.target
diff -u /dev/null packages/corosync/corosync.target:1.1.2.1
--- /dev/null Wed Jul 4 21:36:30 2012
+++ packages/corosync/corosync.target Wed Jul 4 21:36:25 2012
@@ -0,0 +1,5 @@
+[Unit]
+Description=Corosync Stack (bare or OpenAIS)
+
+[Install]
+WantedBy=multi-user.target
================================================================
---- CVS-web:
http://cvs.pld-linux.org/packages/corosync/corosync-notifyd.init?r1=1.1&r2=1.1.2.1
http://cvs.pld-linux.org/packages/corosync/corosync-notifyd.sysconfig?r1=1.1&r2=1.1.2.1
http://cvs.pld-linux.org/packages/corosync/corosync.spec?r1=1.18.2.3&r2=1.18.2.4
More information about the pld-cvs-commit
mailing list