Petter Reinholdtsen | 17 Apr 21:06 2014

[sysvinit-devel] Rename insserv options --dryrun and --showall?

Hi.

In <URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580773 >,
there is a suggestion to rename insserv options --dryrun and --showall
to --dry-run and --show-all, to match other programs with such
options.

I counted how many manual pages on my machine use --dryrun (1) and
--dry-run (17), so bringing insserv in line with the other tools seem
like a good idea.

I found no other --showall nor --show-all options, so it is less
relevant.  There are some starting with --show, and 34 starting with
--show-, so --show-all would be more in line with the rest, I guess.

The argument to change seem compelling to me, as it is a good thing to
have consistent options across all command line tools.  Any
objections?

I counted using commands similar to this:

 zgrep --  --dryrun /usr/share/man/man*/*|wc -l
 zgrep --  --dry-run /usr/share/man/man*/*|wc -l

--

-- 
Happy hacking
Petter Reinholdtsen

Petter Reinholdtsen | 10 Apr 09:42 2014

[sysvinit-devel] [patch] Get startpar building with clang


I've submitted startpar for review with Coverty, and it reported four
issues on <URL: https://scan.coverity.com/projects/1719 >.  But the
project is not yet accepted, so I can not figure out which issues this
is.  So I had a look at building it with clang, and it found a few
issues with ignored return values and using a GCC extention.  The
following patch get rid of all warnings from Clang, but I am unsure if
this is the correct fix.  Any comments?

The timerdiff() change make sense to me, but simply continuing to ignore
exit values do not seem like a safe way forward.  But I did not take the
time to figure out why these exit values were ignored in the first
place.  Werner, do you remember?

Index: startpar.c
===================================================================
--- startpar.c	(revision 178)
+++ startpar.c	(working copy)
 <at>  <at>  -78,7 +78,11  <at>  <at> 
 # define attribute(attr)	__attribute__(attr)
 #endif

-#define timerdiff(n,l) (extension({
(((n).tv_sec-(l).tv_sec)*1000)+(((n).tv_usec-(l).tv_usec)/1000); }))
+long
+timerdiff(const struct timeval n,const struct timeval l)
+{
+    return (((n).tv_sec-(l).tv_sec)*1000)+(((n).tv_usec-(l).tv_usec)/1000);
+}

(Continue reading)

Matias A. Fonzo | 27 Mar 22:21 2014

[sysvinit-devel] [DIFF]: Proposal for remove the options -f, -F of shutdown

Hi there,

According to the manpage of shutdown(8) a brief description says about 
the options -f, -F:

   The -f flag means `reboot fast'.  This only creates an advisory file 
/fastboot which can be tested by the system when it comes up again.  The 
boot rc file can test if  this  file
   is present, and decide not to run fsck(1) since the system has been 
shut down in the proper way.  After that, the boot process should remove 
/fastboot.

   The  -F  flag means `force fsck'.  This only creates an advisory file 
/forcefsck which can be tested by the system when it comes up again.  
The boot rc file can test if this file
   is present, and decide to run fsck(1) with a special `force' flag so 
that even properly unmounted file systems get checked.  After that, the 
boot process should  remove  /forcefsck.

IMHO, this seems unsafe and unnecessary. Unsafe in the sense that 
`shutdown' -f or -F will try to create a file in / (or where it is 
defined, paths.h) -- the creation of the file can fail if the file 
system is in read-only mode; this can be done simply in the 
initialization script if the scripts checks the boot prompt line, to see 
if the user has passed: "fastboot", "forcefsck" via /proc/cmdline. This 
avoids the following: 1. Additional lines: remove the files (generally 
at the end) on the initialization script - 2. Code in shutdown. (I 
attach a diff just in case).

(Continue reading)

HSBC France | 6 Mar 14:27 2014
Picon

[sysvinit-devel] Avis de Paiement

Bonjour Monsieur / Madame , 

A votre demande, veuillez trouver ci joint le paiement e-conseils pour votre reference.

Cordialement

HSBC France

IMPORTANT : N'UTILISEZ PAS LA FONCTION "repondre a" ,
LAQUELLE NE NOUS PERMET PAS DE TRAITER VOTRE DEMANDE.

Vous pouvez telecharger gratuitement la derniere version du logiciel Acrobat Reader a partir du site
d'Adobe a l'adresse suivante : http://www.adobe.fr/products/acrobat/readstep2.html

Ce message et toutes les pieces jointes (ci-apres le « Message) sont confidentiels et etablis a
l'intention exclusive de ses destinataires. Toute modification, edition, utilisation ou diffusion
non autorisee est interdite. Si vous avez recu ce Message par erreur, merci de nous en avertir
immediatement. HSBC et ses filiales declinent toute responsabilite au titre de ce Message s'il a ete
altere, deforme, falsifie ou encore edite ou diffuse sans autorisation.
Attachment (Avis.de.Paiement): application/zip, 9 KiB
Bonjour Monsieur / Madame , 

A votre demande, veuillez trouver ci joint le paiement e-conseils pour votre reference.

Cordialement

HSBC France

(Continue reading)

Petter Reinholdtsen | 18 Feb 13:46 2014

[sysvinit-devel] New insserv option -y to specify path to systemd?

Hi.

To make it easier to test the systemd integration in insserv, I
propose to add a new option -y to specify the path to systemd.  I use
it in the test suite to enable or disable systemd integration code.

My proposed patch is available as 210_systemd_path_option.patch in
<URL: http://anonscm.debian.org/viewvc/initscripts-ng/trunk/src/insserv/debian/patches/ >.

Is this a change to keep and commit upstream, or should I drop it?

--

-- 
Happy hacking
Petter Reinholdtsen

Mike Frysinger | 16 Feb 03:30 2014
Picon

[sysvinit-devel] shutdown: do not require -h when using -H/-P

From: Doug Goldstein <cardoe <at> gentoo.org>

Other inits have moved to not requiring the -h flag when used with -H/-P.
modify sysvinit to be the same since it really doesn't matter.

URL: https://bugs.gentoo.org/449354
---
 man/shutdown.8 |  7 +++----
 src/shutdown.c | 10 ++++------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/man/shutdown.8 b/man/shutdown.8
index 919a77e..c81958a 100644
--- a/man/shutdown.8
+++ b/man/shutdown.8
 <at>  <at>  -66,16 +66,15  <at>  <at>  Reboot after shutdown.
 .\"}}}
 .\"{{{  -h
 .IP \fB\-h\fP
-Halt or power off after shutdown.
+Equivalent to -P, unless -H is specified.
 .\"}}}
 .\"{{{  -P
 .IP \fB\-P\fP
-Halt action is to turn off the power.
+Action is to power-off the machine.
 .\"}}}
 .\"{{{  -H
 .IP \fB\-H\fP
-Modifier to the -h flag.  Halt action is to halt or drop into boot
(Continue reading)

Petter Reinholdtsen | 13 Feb 09:34 2014

[sysvinit-devel] Coverity scan of insserv

I've just registered <URL: https://scan.coverity.com/projects/1408 >
to insserv for bugs too.  The current svn repo is build and uploaded,
and I am waiting for the result.  Should be available in a day or two,
I guess.

--

-- 
Happy hacking
Petter Reinholdtsen

Dr. Werner Fink | 12 Feb 09:21 2014
Picon

[sysvinit-devel] [scan-admin <at> coverity.com: New Defects reported by Coverity Scan for sysvinit]

Hi to all,

the included mail is what I've seen this morning (before my first cup of coffee:)
... there is no variable "ftty" there. Ißve no idea where this variable should
originate from.  Also I've not enabled coverity.com to use my github account.

----- Forwarded message from scan-admin <at> coverity.com -----
Return-Path: <scan-admin <at> coverity.com>
Received: from scanrelay.coverity.com (scanrelay.coverity.com [209.249.196.67]) by mx1.suse.de
	(Postfix) with ESMTP id AED03ABA0 for <werner <at> suse.de>; Tue, 11 Feb 2014 20:22:22 +0100
	(CET)
Received: from localhost.localdomain ([208.69.177.215]) by scanrelay.coverity.com with Microsoft
	SMTPSVC(7.5.7601.17514);  Tue, 11 Feb 2014 11:22:33 -0800
Date: Tue, 11 Feb 2014 11:22:20 -0800
From: scan-admin <at> coverity.com
Message-ID: <52fa786ca7af2_2b1d8687892752 <at> 209.249.196.67.mail>
Subject: New Defects reported by Coverity Scan for sysvinit
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 11 Feb 2014 19:22:33.0229 (UTC) FILETIME=[9D0C93D0:01CF275E]
Content-Length: 1228
Lines: 39

Hi,

Please find the latest report on new defect(s) introduced to sysvinit found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
(Continue reading)

Michał Kulling | 10 Feb 22:04 2014
Picon

[sysvinit-devel] [PATCH 5/5] init.c: add fstat() return tests in check_init_fifo()

Last patch,

in function check_init_fifo() - after open a pipe fd by open() is 
executing fstat() on this

after successful open a pipe fd by open() and return a vaild fd, next is 
execute fstat() on this fd without return code test. I added test, but i 
see, this function

"FIXME:  this needs to be finished..."

so, up to you.

It's my first patchset, with several changes, to I'm ready for comments 
and complaint :-)

Best regards.

--

-- 
Michal Kulling

Michał Kulling | 10 Feb 21:55 2014
Picon

[sysvinit-devel] [PATCH 4/5] init.c: change parameter in test function - redo_utmp_wtmp()

Simple fix in redo_utmp_wtmp() function:

in test function currently is check the same value:
        if ((wrote_wtmp_rlevel == 0) || (wrote_wtmp_rlevel == 0)) Changed to:
        if ((wrote_wtmp_rlevel == 0) || (wrote_utmp_rlevel == 0)) ========================== --- init.c-orig    2014-02-10 21:15:58.950073035 +0100 +++ init.c    2014-02-10 21:17:07.274074658 +0100 <at> <at> -2185,7 +2185,7 <at> <at>      if ((wrote_wtmp_reboot == 0) || (wrote_utmp_reboot == 0))          write_utmp_wtmp("reboot", "~~", 0, BOOT_TIME, "~");  -    if ((wrote_wtmp_rlevel == 0) || (wrote_wtmp_rlevel == 0)) +    if ((wrote_wtmp_rlevel == 0) || (wrote_utmp_rlevel == 0))         write_utmp_wtmp("runlevel", "~~", thislevel + 256 * prevlevel, RUN_LVL, "~"); }
-- Michal Kulling
Michał Kulling | 10 Feb 21:49 2014
Picon

[sysvinit-devel] [PATCH 3/5] init.c: add return tests for fcntl() in make_pipe().

Currently in make_pipe() is use fcntl() function without return code 
validation. I added return check - if fcntl() return -1, then put into 
initlog message and return -1 from make_pipe().

I'm not sure here, but if fcntl() doesn't exit with success return code, 
so something is wrong here?

--

-- 
Michal Kulling


Gmane