Hello community, here is the log from the commit of package rebootmgr for openSUSE:Factory checked in at 2020-07-02 23:57:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rebootmgr (Old) and /work/SRC/openSUSE:Factory/.rebootmgr.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rebootmgr" Thu Jul 2 23:57:10 2020 rev:18 rq:818115 version:1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/rebootmgr/rebootmgr.changes 2020-06-10 00:35:20.264902778 +0200 +++ /work/SRC/openSUSE:Factory/.rebootmgr.new.3060/rebootmgr.changes 2020-07-02 23:57:33.617115911 +0200 @@ -1,0 +2,8 @@ +Wed Jul 1 13:04:21 UTC 2020 - Thorsten Kukuk <ku...@suse.com> + +- Update to version 1.3 + - Fix documentation of is-active return value [bsc#1173484] + - Fix crash if rebootmgrd is already running + - Fix systemctl restart + +------------------------------------------------------------------- Old: ---- rebootmgr-1.2.tar.xz New: ---- rebootmgr-1.3.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rebootmgr.spec ++++++ --- /var/tmp/diff_new_pack.3Cq93Z/_old 2020-07-02 23:57:37.149127620 +0200 +++ /var/tmp/diff_new_pack.3Cq93Z/_new 2020-07-02 23:57:37.153127632 +0200 @@ -24,7 +24,7 @@ %endif Name: rebootmgr -Version: 1.2 +Version: 1.3 Release: 0 Summary: Automatic controlled reboot during a maintenance window License: GPL-2.0-only AND LGPL-2.1-or-later ++++++ rebootmgr-1.2.tar.xz -> rebootmgr-1.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/NEWS new/rebootmgr-1.3/NEWS --- old/rebootmgr-1.2/NEWS 2020-06-08 15:51:04.000000000 +0200 +++ new/rebootmgr-1.3/NEWS 2020-07-01 14:25:56.000000000 +0200 @@ -2,6 +2,11 @@ Copyright (C) 2016-2020 Thorsten Kukuk +Version 1.3 +* Fix documentation of is-active return value [bsc#1173484] +* Fix crash if rebootmgrd is already running +* Fix systemctl restart + Version 1.2 * rebootmgr depends on dbus and not the network diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/configure new/rebootmgr-1.3/configure --- old/rebootmgr-1.2/configure 2020-06-08 15:51:10.000000000 +0200 +++ new/rebootmgr-1.3/configure 2020-07-01 14:26:08.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for rebootmgr 1.2. +# Generated by GNU Autoconf 2.69 for rebootmgr 1.3. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='rebootmgr' PACKAGE_TARNAME='rebootmgr' -PACKAGE_VERSION='1.2' -PACKAGE_STRING='rebootmgr 1.2' +PACKAGE_VERSION='1.3' +PACKAGE_STRING='rebootmgr 1.3' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1300,7 +1300,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rebootmgr 1.2 to adapt to many kinds of systems. +\`configure' configures rebootmgr 1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1366,7 +1366,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rebootmgr 1.2:";; + short | recursive ) echo "Configuration of rebootmgr 1.3:";; esac cat <<\_ACEOF @@ -1480,7 +1480,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rebootmgr configure 1.2 +rebootmgr configure 1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1845,7 +1845,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rebootmgr $as_me 1.2, which was +It was created by rebootmgr $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2708,7 +2708,7 @@ # Define the identity of the package. PACKAGE='rebootmgr' - VERSION='1.2' + VERSION='1.3' cat >>confdefs.h <<_ACEOF @@ -6560,7 +6560,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rebootmgr $as_me 1.2, which was +This file was extended by rebootmgr $as_me 1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6626,7 +6626,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -rebootmgr config.status 1.2 +rebootmgr config.status 1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/configure.ac new/rebootmgr-1.3/configure.ac --- old/rebootmgr-1.2/configure.ac 2020-06-08 15:50:45.000000000 +0200 +++ new/rebootmgr-1.3/configure.ac 2020-07-01 14:26:02.000000000 +0200 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(rebootmgr, 1.2) +AC_INIT(rebootmgr, 1.3) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_SRCDIR([src/rebootmgrd.c]) AM_CONFIG_HEADER(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/man/rebootmgr.index.html new/rebootmgr-1.3/man/rebootmgr.index.html --- old/rebootmgr-1.2/man/rebootmgr.index.html 2020-04-29 10:08:43.000000000 +0200 +++ new/rebootmgr-1.3/man/rebootmgr.index.html 2020-06-30 17:07:14.000000000 +0200 @@ -15,4 +15,4 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 1.0</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> — Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> — Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> — Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 1.2</span><hr><div class="refentry"><a name="rebootmgr.index"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>rebootmgr.index — List all manpages from the rebootmgr project</p></div><div class="refsect1"><a name="id-1.4"></a><h2 id="O">O<a class="headerlink" title="Permalink to this headline" href="#O">¶</a></h2><p><a href="org.opensuse.RebootMgr.conf.8.html"><span class="citerefentry"><span class="refentrytitle">org.opensuse.RebootMgr.conf</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.5"></a><h2 id="R">R<a class="headerlink" title="Permalink to this headline" href="#R">¶</a></h2><p><a href="rebootmgr.conf.5.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.conf</span>(5)</span></a> — Reboot Manager configuration files<br><a href="rebootmgr.service.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgr.service</span>(8)</span></a> — Reboot the machine during a maintenance window.<br><a href="rebootmgrctl.1.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrctl</span>(1)</span></a> — Tool to control and configure the reboot manager daemon.<br><a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> — Reboot the machine during a maintenance window.<br></p></div><div class="refsect1"><a name="id-1.6"></a><p><a name="counts"></a>This index contains 5 entries, referring to 3 individual manual pages.</p></div></div></body></html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/man/rebootmgrctl.1 new/rebootmgr-1.3/man/rebootmgrctl.1 --- old/rebootmgr-1.2/man/rebootmgrctl.1 2020-04-29 10:08:42.000000000 +0200 +++ new/rebootmgr-1.3/man/rebootmgrctl.1 2020-06-30 17:07:14.000000000 +0200 @@ -2,12 +2,12 @@ .\" Title: rebootmgrctl .\" Author: Thorsten Kukuk <ku...@suse.de> .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> -.\" Date: 04/29/2020 +.\" Date: 06/30/2020 .\" Manual: rebootmgrctl .\" Source: rebootmgr .\" Language: English .\" -.TH "REBOOTMGRCTL" "1" "04/29/2020" "rebootmgr" "rebootmgrctl" +.TH "REBOOTMGRCTL" "1" "06/30/2020" "rebootmgr" "rebootmgrctl" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -92,11 +92,11 @@ option, \fBrebootmgrctl\fR does not print any output, but returns -1 +0 if \fBrebootmgrd\fR is running or -0 +1 if not\&. .RE .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/man/rebootmgrctl.1.html new/rebootmgr-1.3/man/rebootmgrctl.1.html --- old/rebootmgr-1.2/man/rebootmgrctl.1.html 2020-04-29 10:08:42.000000000 +0200 +++ new/rebootmgr-1.3/man/rebootmgrctl.1.html 2020-06-30 17:07:14.000000000 +0200 @@ -15,15 +15,15 @@ h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink { visibility: visible; } - </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 1.0</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to + </style><a href="rebootmgr.index.html">Index </a><span style="float:right">rebootmgr 1.2</span><hr><div class="refentry"><a name="rebootmgrctl.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>rebootmgrctl — Tool to control and configure the reboot manager daemon.</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> [ --help | --version ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> is-active [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> reboot [ fast | now ]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> cancel </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> status [--quiet]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-strategy best-effort | etcd-lock | maint-window | instantly | off </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-strategy </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-group <em class="replaceable"><code>group</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-group </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-window <em class="replaceable"><code>time</code></em> <em class="replaceable"><code>duration</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> get-window </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> set-max [--group <em class="replaceable"><code>group</code></em>] <em class="replaceable"><code>number</code></em> </p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> lock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div><div class="cmdsynopsis"><p><code class="command">rebootmgrctl</code> unlock [--group <em class="replaceable"><code>group</code></em>] [<em class="replaceable"><code>machine-id</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="emphasis"><em>rebootmgrctl</em></span> is used to query and configure the <a href="rebootmgrd.8.html"><span class="citerefentry"><span class="refentrytitle">rebootmgrd</span>(8)</span></a> - process. Options regarding to <code class="option">etcd-lock</code> are only available if + process. Options regarding to <code class="option">etcd-lock</code> are only available if <span class="emphasis"><em>rebootmgrctl</em></span> was compiled with etcd support.</p></div><div class="refsect1"><a name="options"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help">¶</a></dt><dd><p>display help text and exit</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p>output version information and exit</p></dd><dt id="cancel"><span class="term"><code class="option">cancel</code></span><a class="headerlink" title="Permalink to this term" href="#cancel">¶</a></dt><dd><p>Cancels an already running reboot.</p></dd><dt id="is-active --quiet"><span class="term"><code class="option">is-active</code> [<span class="optional">--quiet</span>]</span><a class="headerlink" title="Permalink to this term" href="#is-active%20--quiet">¶</a></dt><dd><p>Prints if the rebootmgrd is running and active or not. With the [<span class="optional">--quiet</span>] option, <span class="command"><strong>rebootmgrctl</strong></span> does not print any output, but returns - "<code class="literal">1</code>" if <span class="command"><strong>rebootmgrd</strong></span> is running or - "<code class="literal">0</code>" if not.</p></dd><dt id="reboot fast|now"><span class="term"><code class="option">reboot</code> [<span class="optional">fast|now</span>]</span><a class="headerlink" title="Permalink to this term" href="#reboot%20fast%7Cnow">¶</a></dt><dd><p> + "<code class="literal">0</code>" if <span class="command"><strong>rebootmgrd</strong></span> is running or + "<code class="literal">1</code>" if not.</p></dd><dt id="reboot fast|now"><span class="term"><code class="option">reboot</code> [<span class="optional">fast|now</span>]</span><a class="headerlink" title="Permalink to this term" href="#reboot%20fast%7Cnow">¶</a></dt><dd><p> Tells rebootmgr to schedule a reboot. With the [<span class="optional">now</span>] option, a forced reboot is done, no lock from <span class="command"><strong>etcd</strong></span> is requested and a set maintenance diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/man/rebootmgrctl.1.xml new/rebootmgr-1.3/man/rebootmgrctl.1.xml --- old/rebootmgr-1.2/man/rebootmgrctl.1.xml 2019-08-17 10:08:52.000000000 +0200 +++ new/rebootmgr-1.3/man/rebootmgrctl.1.xml 2020-06-30 17:06:21.000000000 +0200 @@ -3,7 +3,7 @@ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> <!-- \-*\- nroff \-*\- --> -<!-- Copyright 2017 Thorsten Kukuk <ku...@suse.de> --> +<!-- Copyright 2017, 2020 Thorsten Kukuk <ku...@suse.de> --> <!-- This file is part of rebootmgr. --> @@ -135,7 +135,7 @@ <para><emphasis remap='B'>rebootmgrctl</emphasis> is used to query and configure the <citerefentry><refentrytitle>rebootmgrd</refentrytitle><manvolnum>8</manvolnum></citerefentry> - process. Options regarding to <option>etcd-lock</option> are only available if + process. Options regarding to <option>etcd-lock</option> are only available if <emphasis remap='B'>rebootmgrctl</emphasis> was compiled with etcd support.</para> </refsect1> @@ -165,8 +165,8 @@ <para>Prints if the rebootmgrd is running and active or not. With the <optional>--quiet</optional> option, <command>rebootmgrctl</command> does not print any output, but returns - <literal>1</literal> if <command>rebootmgrd</command> is running or - <literal>0</literal> if not.</para> + <literal>0</literal> if <command>rebootmgrd</command> is running or + <literal>1</literal> if not.</para> </listitem> </varlistentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/src/rebootmgrd.c new/rebootmgr-1.3/src/rebootmgrd.c --- old/rebootmgr-1.2/src/rebootmgrd.c 2020-04-27 11:37:47.000000000 +0200 +++ new/rebootmgr-1.3/src/rebootmgrd.c 2020-07-01 14:10:12.000000000 +0200 @@ -125,8 +125,22 @@ { pthread_mutex_unlock (&mutex_ctx); log_msg (LOG_INFO, "rebootmgr: reboot triggered now!"); - if (execl ("/usr/bin/systemctl", "systemctl", "reboot", NULL) == -1) - log_msg (LOG_ERR, "Calling /usr/bin/systemctl failed: %m"); + pid_t pid = fork(); + + if (pid < 0) + { + log_msg (LOG_ERR, "Calling /usr/bin/systemctl failed: %m"); + } + else if (pid == 0) + { + if (execl ("/usr/bin/systemctl", "systemctl", "reboot", + NULL) == -1) + { + log_msg (LOG_ERR, "Calling /usr/bin/systemctl failed: %m"); + exit (1); + } + exit (0); + } } else log_msg (LOG_DEBUG, "systemctl reboot called!"); @@ -696,7 +710,7 @@ int status; status = dbus_init (); - if (status < 1) + if (status < 0) log_msg (LOG_ERR, "ERROR: Reconnect to dbus failed"); else log_msg (LOG_INFO, "Reconnect to dbus was successful"); @@ -725,8 +739,8 @@ /* init dbus return value: - 1: success - 0: error + 0: success + -1: error */ static int dbus_init () @@ -768,7 +782,7 @@ { log_msg (LOG_ERR, "ERROR: DBus failure requesting a bus name: %s", error.message); dbus_error_free (&error); - return 0; + return -1; } if ( request_name_reply == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER ) { @@ -779,7 +793,7 @@ else { log_msg (LOG_ERR, "ERROR: Failed to reserve name %s", RM_DBUS_NAME); - return 0; + return -1; } } else @@ -791,7 +805,7 @@ name */ log_msg (LOG_ERR, "ERROR: %s is already reserved", RM_DBUS_NAME); - return 1; + return -1; } dbus_bus_add_match (connection, "type='signal'," @@ -844,20 +858,20 @@ ctx->connection = connection; pthread_mutex_unlock (&mutex_ctx); - return 1; + return 0; out: if (connection) { dbus_bus_release_name (connection, RM_DBUS_NAME, &error); dbus_connection_unref (connection); - return 0; + return -1; } else { if (debug_flag) log_msg (LOG_DEBUG, "No connection possible"); - return 0; + return -1; } } @@ -927,7 +941,7 @@ #endif /* USE_ETCD */ pthread_mutex_unlock (&mutex_ctx); - if (dbus_init () != 1) + if (dbus_init () != 0) return 1; while (true) @@ -939,7 +953,7 @@ break; else { - if (dbus_init () != 1) + if (dbus_init () != 0) return 1; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rebootmgr-1.2/systemd/rebootmgr.service new/rebootmgr-1.3/systemd/rebootmgr.service --- old/rebootmgr-1.2/systemd/rebootmgr.service 2020-06-08 14:41:57.000000000 +0200 +++ new/rebootmgr-1.3/systemd/rebootmgr.service 2020-07-01 14:21:38.000000000 +0200 @@ -10,7 +10,6 @@ BusName=org.opensuse.RebootMgr ExecStart=/usr/sbin/rebootmgrd Restart=on-failure -KillMode=none [Install] WantedBy=multi-user.target