Init starting twice again
> libc6 executes "init u" in postinst to tell init to re-execute, but
> only recent versions of init support this feature. If an old init is
> still running (altough the new one has been installed since the last
> reboot), the "init u" will execute boot code, trashing the filesystem.
>
> The only safe way to upgrade would be to:
> - install a recent sysvinit
> - imperatively _REBOOT_
> - complete the upgrade
Sorry for this misleading statement, the problem is more serious,
"init u" never works on Alpha.
I just crashed my machine, by trying it (and it is remote :-().
I just took a look at the code, there seems to be a problem in the
check_pipe function in sysvinit-2.73/src/init.c
char *Signature = "12567362"; /* Signature for re-exec fd */
[...]
int check_pipe(int fd)
{
struct timeval t;
fd_set s;
char signature[8];
FD_ZERO(&s);
FD_SET(fd, &s);
t.tv_sec = t.tv_usec = 0;
if (select(fd+1, &s, NULL, NULL, &t) != 1)
return 0;
if (read(fd, signature, 8) != 8)
return 0;
return strcmp(Signature, signature) == 0;
}
I think signature should be declared as a 9 bytes array, and the ninth
bye shoudl be set to zero. But I am currently unable to test it :-(
Loic
Reply to: