Ben Shelton | 28 Jul 18:02 2014

[sysvinit-devel] [PATCH] bootlogd: Allow console writes to ttyPS*


The patch below enables bootlogd to make console writes to /dev/ttyPS*,
the default naming convention for xilinx-zynq UARTs.  It was originally
written by Richard Tollerton (copied).



Index: sysvinit/trunk/src/bootlogd.c
--- sysvinit/trunk/src/bootlogd.c	(revision 200)
+++ sysvinit/trunk/src/bootlogd.c	(working copy)
 <at>  <at>  -85,6 +85,7  <at>  <at> 
 	{ "ttyB",	"/dev/ttyB%s",		NULL		},
 	{ "ttySC",	"/dev/ttySC%s",		"/dev/ttsc/%s"	},
 	{ "ttyS",	"/dev/ttyS%s",		"/dev/tts/%s"	},
+	{ "ttyPS",	"/dev/ttyPS%s",		NULL		},
 	{ "tty",	"/dev/tty%s",		"/dev/vc/%s"	},
 	{ "hvc",	"/dev/hvc%s",		"/dev/hvc/%s"	},
 	{ NULL,		NULL,			NULL		},
 <at>  <at>  -94,7 +95,7  <at>  <at> 
  *	Devices to try as console if not found on kernel command line.
  *	Tried from left to right (as opposed to kernel cmdline).
-char *defcons[] = { "tty0", "hvc0", "ttyS0", "ttySC0", "ttyB0", NULL };
+char *defcons[] = { "tty0", "hvc0", "ttyS0", "ttyPS0", "ttySC0", "ttyB0", NULL };

(Continue reading)

Askar Safin | 28 Jun 23:06 2014

[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" ( ).

Askar Safin
Moscow, Russia
Moscow State University, , 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)
-					"Sending processes the TERM signal");
+					"Sending processes configured via /etc/inittab the TERM signal");
 			kill(-(ch->pid), SIGTERM);
 			foundOne = 1;
 		case 1: /* Send KILL signal and collect status */
 			if (talk)
-					"Sending processes the KILL signal");
+					"Sending processes configured via /etc/inittab the KILL signal");
 			kill(-(ch->pid), SIGKILL);
(Continue reading)

Dark Templar | 27 Jun 21:36 2014

[sysvinit-devel] SysVinit: support unmounting root


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:
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?


In <URL: >,
there is a suggestion to rename insserv options --dryrun and --showall
to --dry-run and --show-all, to match other programs with such

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

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: >.  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)

-#define timerdiff(n,l) (extension({
(((n).tv_sec-(l).tv_sec)*1000)+(((n).tv_usec-(l).tv_usec)/1000); }))
+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 

   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

[sysvinit-devel] Avis de Paiement

Bonjour Monsieur / Madame , 

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


HSBC France


Vous pouvez telecharger gratuitement la derniere version du logiciel Acrobat Reader a partir du site
d'Adobe a l'adresse suivante :

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 ( application/zip, 9 KiB
Bonjour Monsieur / Madame , 

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


HSBC France

(Continue reading)

Petter Reinholdtsen | 18 Feb 13:46 2014

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


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: >.

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

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

From: Doug Goldstein <cardoe <at>>

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.

 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: >
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

[sysvinit-devel] [scan-admin <at> 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 to use my github account.

----- Forwarded message from scan-admin <at> -----
Return-Path: <scan-admin <at>>
Received: from ( []) by
	(Postfix) with ESMTP id AED03ABA0 for <werner <at>>; Tue, 11 Feb 2014 20:22:22 +0100
Received: from localhost.localdomain ([]) by 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>
Message-ID: <52fa786ca7af2_2b1d8687892752 <at>>
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


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)