Askar Safin | 28 Jun 23:06 2014
Picon

[sysvinit-devel] [PATCH] Sending processes configured via /etc/inittab the KILL signal

Hi, please apply this patch. It makes a message less confusing. I. e. now we understand that init doesn't
kill all processes, but instead kill mentioned in inittab ones. This patch is taken from "Linux From
Scratch" ( http://www.linuxfromscratch.org/lfs/view/stable/chapter03/patches.html ).

==
Askar Safin
http://vk.com/safinaskar
Moscow, Russia
Moscow State University, http://msu.ru , Faculty of Mechanics and Mathematics, Department of
Mathematical Logic and Theory of Algorithms

diff -Naur sysvinit-2.88dsf.orig/src/init.c sysvinit-2.88dsf/src/init.c
--- sysvinit-2.88dsf.orig/src/init.c	2010-04-13 04:48:54.000000000 -0500
+++ sysvinit-2.88dsf/src/init.c	2013-12-12 16:17:34.292881603 -0600
 <at>  <at>  -1498,14 +1498,14  <at>  <at> 
 		case 0: /* Send TERM signal */
 			if (talk)
 				initlog(L_CO,
-					"Sending processes the TERM signal");
+					"Sending processes configured via /etc/inittab the TERM signal");
 			kill(-(ch->pid), SIGTERM);
 			foundOne = 1;
 			break;
 		case 1: /* Send KILL signal and collect status */
 			if (talk)
 				initlog(L_CO,
-					"Sending processes the KILL signal");
+					"Sending processes configured via /etc/inittab the KILL signal");
 			kill(-(ch->pid), SIGKILL);
 			break;
(Continue reading)

Dark Templar | 27 Jun 21:36 2014
Picon

[sysvinit-devel] SysVinit: support unmounting root

Hi.

In order to unmount root and properly shutdown lvm/encrypted devices/etc
I've written update for sysvinit. It allows to exec into another
application. It can be used to create new root filesystem in memory in
that application, switch to this new root, and then unmount old root and
shutdown underlying devices.

I've found similar feature request in the bugzilla:
http://savannah.nongnu.org/bugs/?33517
There is even a similar patch attached.

I'm attaching my patch for sysvinit-2.88 and archive with diff for
inittab and test scripts. On test setup I put those scripts into
/usr/local/sbin/. The scripts mostly use static busybox, and right
before shutdown/reboot it invokes shell for debugging purposes. It does
not shut down any lvm/encrypted device/etc, but it's not so much to
write from here. In case of failing to exec into another process init
goes to next record in the inittab, that's why I don't remove plain
poweroff/reboot records. I think in that case it's better to shutdown at
least that way compared to panicking.

I'd like to have this patch merged into sysvinit. I've used gentoo linux
as a test platform for this feature.
Attachment (sysvinit-exec.patch): text/x-patch, 4654 bytes
Attachment (sysvinit-data.tar.bz2): application/x-bzip, 1277 bytes
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


Gmane