Lolo Accommodation | 17 Apr 2013 18:11
Favicon

[sysvinit-devel] Reliable and Friendly Holiday Accommodation in Strand, Western Cape, South Africa

From: Lolo Accommodation

To: sysvinit-devel <at> nongnu.org

We are a Holiday Accomodation Rental Company in Strand, Western Cape, South Africa. If you need holiday accommodation with a sea view in Strand, Western Cape, South Africa, we can be contacted at Tel Nr: +27 21 853 0851 or call Trudi Lotz at +27 82 339 9085 or e-mail us at info <at> loloaccommodation.com or visit us at our website : www.loloaccommodation.com

Due to the fact of our large database of clients, we need more rental holiday accommodation so if you have a flat in Beach Road, Strand and you are looking for a Rental Company in Strand look no further than Lolo Accommodation. We will show you what Reliable and Friendly Accommodation means. If you want to invest in a Holiday Property in Beach Road on the sea you can also contact us and we will also assist you with a purchase of a property and also manage and do the rental of the property on your behalf. 

                                                                                                 THIS IS A ONCE OFF E-MAIL

This email was sent to sysvinit-devel <at> nongnu.org by marketing <at> loloaccommodation.com

If you want to receive our newsletter please SUBSCRIBE TO NEWSLETTER here

Instant removal with Unsubscribe / 73 Grey Street, Strand, Western Cape, South Africa. 7140

 

 

 

 

 

 

 

 

 

 

Steve Parker | 22 Jan 2013 21:41
Favicon

[sysvinit-devel] Epoch time in "last" output

Hi sysvinit Developers,

I had a requirement to check for accounts which had not been used in a 
given time period; last seemed to be a useful tool to do that, but of 
course its output is in human-readable format and not easily parsed (or 
at least, not accurately).

I have therefore created the attached patch to src/last.c, against 
sysvinit-2.88dsf, which adds a "-e" (epoch) switch.

$ ./last -n5
steve    pts/4        :0.0             Tue Jan 22   still    logged in
steve    pts/4        hp               Tue Jan 22 - 17:15     (00:09)
steve    pts/4        hp               Tue Jan 22 - 16:31     (00:06)
steve    pts/4        :0.0             Mon Jan 21 - 23:34     (00:05)
steve    pts/5        :0.0             Mon Jan 21 - 23:34     (00:05)

wtmp begins Wed Jan  2 12:35:41 2013
$ ./last -n5 -e
steve    pts/4        :0.0             1358883350   still    logged in
steve    pts/4        hp               1358874384 1358874925  (00:09)
steve    pts/4        hp               1358871905 1358872289  (00:06)
steve    pts/4        :0.0             1358810967 1358811276  (00:05)
steve    pts/5        :0.0             1358810944 1358811276  (00:05)

wtmp begins Wed Jan  2 12:35:41 2013
$

Comments appreciated, particularly any thoughts about a better way to do 
the %-10.10s vs %-7.7s sprintf reformatting, and about -F being 
incompatible with -e - worth testing for?

Steve Parker
steve <at> steve-parker.org
Attachment (sysvinit-epoch.diff): text/x-patch, 2562 bytes
niqingliang2003 | 15 Jan 2013 11:50
Picon

[sysvinit-devel] the sysvinit pause

when booting,
I can see
INIT: version 2.88 booting
but it stop 30 seconds  before and after "version 2.88 booting".

I have debugged the code, found that:
the 30seconds is about close(fd) in function:
void print(char *s)				(src/init.c)

If I open "INITDEBUG" in src/init.h, I can boot normally.

anyone can give some suggestion?
THANKS

Nanjing Jilong
Yi Qingliang

Zachary Winnerman | 27 Dec 2012 05:10

[sysvinit-devel] TODO in src/init.c

Sysvinit maintainers,

Below is a git-diff that implements the TODO mentioned in src/init.c.
I am not very familiar with SVN, so I am not sure how to properly
submit this patch.  Thank you for your time.
diff --git a/src/init.c b/src/init.c
index 27532ad..3b72575 100644
--- a/src/init.c
+++ b/src/init.c
 <at>  <at>  -309,22 +309,6  <at>  <at>  void send_state(int fd)
 }

 /*
- *     Read a string from a file descriptor.
- *     FIXME: why not use fgets() ?
- */
-static int get_string(char *p, int size, FILE *f)
-{
-       int     c;
-
-       while ((c = getc(f)) != EOF && c != '\n') {
-               if (--size > 0)
-                       *p++ = c;
-       }
-       *p = '\0';
-       return (c != EOF) && (size > 0);
-}
-
-/*
  *     Read trailing data from the state pipe until we see a newline.
  */
 static int get_void(FILE *f)
 <at>  <at>  -412,7 +396,7  <at>  <at>  static CHILD *get_record(FILE *f)
        } while (cmd != C_REC);

        p = imalloc(sizeof(CHILD));
-       get_string(p->id, sizeof(p->id), f);
+       fgets(p->id, sizeof(p->id), f);

        do switch(cmd = get_cmd(f)) {
                case 0:
 <at>  <at>  -426,13 +410,13  <at>  <at>  static CHILD *get_record(FILE *f)
                        fscanf(f, "%u\n", &(p->exstat));
                        break;
                case C_LEV:
-                       get_string(p->rlevel, sizeof(p->rlevel), f);
+                       fgets(p->rlevel, sizeof(p->rlevel), f);
                        break;
                case C_PROCESS:
-                       get_string(p->process, sizeof(p->process), f);
+                       fgets(p->process, sizeof(p->process), f);
                        break;
                case C_FLAG:
-                       get_string(s, sizeof(s), f);
+                       fgets(s, sizeof(s), f);
                        for(i = 0; flags[i].name; i++) {
                                if (strcmp(flags[i].name,s) == 0)
                                        break;
 <at>  <at>  -440,7 +424,7  <at>  <at>  static CHILD *get_record(FILE *f)
                        p->flags |= flags[i].mask;
                        break;
                case C_ACTION:
-                       get_string(s, sizeof(s), f);
+                       fgets(s, sizeof(s), f);
                        for(i = 0; actions[i].name; i++) {
                                if (strcmp(actions[i].name, s) == 0)
                                        break;
 <at>  <at>  -471,7 +455,7  <at>  <at>  int receive_state(int fd)

        if (get_cmd(f) != C_VER)
                return -1;
-       get_string(old_version, sizeof(old_version), f);
+       fgets(old_version, sizeof(old_version), f);
        oops_error = 0;
        for (pp = &family; (*pp = get_record(f)) != NULL; pp = &((*pp)->next))
                ;

Thank you,
Zach

Xabier M. | 4 Nov 2012 23:01
Picon

[sysvinit-devel] SIGQUIT + restart action support

Hello everyone,


Before I begin, my apologies if this is not the way to go if I want to make a contribution. I really feel that I should give something back to the developer community after all that I am learning thanks to it.

So I have developed a modification for Sysvinit v2.88dsf that enables it to use a very useful feature available in busybox init.

In embedded systems, it might be interesting to switch from one version of init to another without rebooting the system in order to perform filesystem upgrades. In my case, we are puting a small rootfs with busybox init in tmpfs, and switching to it with pivot_root, chroot and the aforementioned feature, we are able to umount the old filesystem and program a new one.

With this patch, sysvinit acquires a new action: reset . When reset is defined in inittab, upon reception of signal SIGQUIT, init kills al processes running on the system except for itself, and launches the new init binary specified on inittab.

I hope this is helpful to someone. If I'm doing this wrong, directions on where I should look in order to learn how to do this properly would be much appreciated.

Regards,

Reibax.
Attachment (sysvinit-sigquit_ikusi.patch): application/octet-stream, 7383 bytes
Guido Trentalancia | 16 Sep 2012 18:42

[sysvinit-devel] sysvinit-2.88dsf: timeout opening/writing control channel /dev/initctl

Hello.

I was trying to re-install sysvinit, but unfortunately I am hitting a 
problem related to the init FIFO.

Basically after re-installing it, init is getting stuck at boot with the 
following error message:

telinit: timeout opening/writing control channel /dev/initctl

After reading several online bug reports, it seems that this is a well 
known problem, however I have not found a clear and widely accepted 
solution to this problem yet, so I was wondering whether anybody on this 
list already came up with one...

Thanks for your time.

Guido

Karel Zak | 21 Jun 2011 12:01
Picon
Favicon
Gravatar

[sysvinit-devel] deprecate sysvinit mountpoint(1)


 Hi,

 I have reimplemented the mountpoint(1) command for libmount. The new
 implementation will be available in the next util-linux release
 (2.20).  I think that the command should be maintained in the same
 place as mount(8) command.

 Would be possible to disable the old version in sysvinit suite and
 not install this version by default?

    Karel

--

-- 
 Karel Zak  <kzak <at> redhat.com>
 http://karelzak.blogspot.com

Florian H. | 14 Jun 2011 17:31
Favicon

[sysvinit-devel] sysvinit-2.88dsf will not compile

Hey,

I am trying to make sysvinit 2.88 on an embedded linux system (Motorola
Set Top Box VIP1710).

$ uname -a
Linux 192.168.1.121 2.4.30 #1 Thu Jan 11 14:28:39 CET 2007 mips
GNU/Linux

But it throws following error:

192.168.1.121/usr/local/sysvinit-2.88dsf$ make all
make -C src all
make[1]: Entering directory `/usr/local/sysvinit-2.88dsf/src'
cc -ansi -O2 -fomit-frame-pointer -W -Wall -D_GNU_SOURCE   -c -o
hddown.o hddown.c
In file included from /usr/include/linux/fs.h:26,
                 from hddown.c:39:
/usr/include/asm/bitops.h:585: error: syntax error before "int"
make[1]: *** [hddown.o] Error 1
make[1]: Leaving directory `/usr/local/sysvinit-2.88dsf/src'
make: *** [all] Error 2

Any idea?

--
Florian Hülsmann
f <at> fpg.de.hm

Kirill Elagin | 10 Jun 2011 23:48
Picon
Gravatar

[sysvinit-devel] Unmounting root fs

Hello,

I'm currently working on a project which requires booting Gentoo from a file on an NTFS partition.

We've encountered a problem related to unmounting root fs (we need this to close underlying NTFS partition gracefully). It is impossible to unmount root while init is running so we had to add a new 'exec' command to inittab which replaces init whith another executable (capable of unmounting root). Please, take a look at our patch and consider adding proposed feature to sysvinit.

Thank you.


--
Кирилл Елагин
Ludwig Nussel | 26 May 2011 08:23
Picon
Gravatar

[sysvinit-devel] [PATCH] automatically spawn agetty on kernel consoles

The feature is useful for developers and admins that occasionally need
to boot with e.g. console=ttyS0.
The built in default can be overridden via inittab for each device. An
entry like "S0::off:" turns off the getty on ttyS0.
---
 src/init.c |   74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 74 insertions(+), 0 deletions(-)

diff --git a/src/init.c b/src/init.c
index d379fb2..13deef7 100644
--- a/src/init.c
+++ b/src/init.c
 <at>  <at>  -1243,6 +1243,76  <at>  <at>  void startup(CHILD *ch)
 	}
 }

+#ifdef __linux__
+static
+void check_kernel_console()
+{
+	FILE* fp;
+	char buf[4096];
+	if ((fp = fopen("/proc/cmdline", "r")) == 0) {
+		return;
+	}
+	if (fgets(buf, sizeof(buf), fp)) {
+		char* p = buf;
+		while ((p = strstr(p, "console="))) {
+			char* e;
+			p += strlen("console=");
+			for (e = p; *e; ++e) {
+				switch (*e) {
+					case '-' ... '9':
+					case 'A' ... 'Z':
+					case '_':
+					case 'a' ... 'z':
+						continue;
+				}
+				break;
+			}
+			if (p != e) {
+				CHILD* old;
+				int dup = 0;
+				char id[8] = {0};
+				char dev[32] = {0};
+				strncpy(dev, p, MIN(sizeof(dev), (unsigned)(e-p)));
+				if (!strncmp(dev, "tty", 3))
+					strncpy(id, dev+3, sizeof(id));
+				else
+					strncpy(id, dev, sizeof(id));
+
+				for(old = newFamily; old; old = old->next) {
+					if (!strcmp(old->id, id)) {
+						dup = 1;
+					}
+				}
+				if (!dup) {
+					CHILD* ch = imalloc(sizeof(CHILD));
+					ch->action = RESPAWN;
+					strcpy(ch->id, id);
+					strcpy(ch->rlevel, "2345");
+					sprintf(ch->process, "/sbin/agetty -L -s 115200,38400,9600 %s vt102", dev);
+					ch->next = NULL;
+					for(old = family; old; old = old->next) {
+						if (strcmp(old->id, ch->id) == 0) {
+							old->new = ch;
+							break;
+						}
+					}
+					/* add to end */
+					for(old = newFamily; old; old = old->next) {
+						if (!old->next) {
+							old->next = ch;
+							break;
+						}
+					}
+
+					initlog(L_VB, "added agetty on %s with id %s", dev, id);
+				}
+			}
+		}
+	}
+	fclose(fp);
+	return;
+}
+#endif

 /*
  *	Read the inittab file.
 <at>  <at>  -1455,6 +1525,10  <at>  <at>  void read_inittab(void)
    */
   if (fp) fclose(fp);

+#ifdef __linux__
+  check_kernel_console();
+#endif
+
   /*
    *	Loop through the list of children, and see if they need to
    *	be killed. 
--

-- 
1.7.3.4

Jason | 27 Jan 2011 21:33

[sysvinit-devel] init hangs on select()

I went from kernel 2.6.23.5 to 2.6.37 and init hangs before switching to 
run level 3.  It executes all initial system scripts via "rc sysinit" at 
sysinit runlevel but never switches to run level 3 which is my 
initdefault.  This was first seen with sysvinit-2.86 so I upgraded to 
sysvinit-2.88dsf and still I have the same issue.

I then enabled debug and added my own debug statements and found that 
it's hanging on select() inside check_init_fifo().  Why would select() 
hang when it has a five second timeout set?

Kernels 2.6.23.17 and 2.6.25.20 work fine.  Kernels 2.6.35.10, 2.6.37, 
2.6.38-rc1 all have the init hang issue.

I am compiling init on a 2.6.23.5 system so I don't know if that is an 
issue or not.  The system has gcc 4.0.1 and glibc-2.3.5.  Is there a 
requirement to have glibc compiled against newer kernel headers?

Jason


Gmane