20101130-alt2
- spawning plymouth fixed
This commit is contained in:
parent
d8046cc1e2
commit
cc71950045
@ -3,7 +3,7 @@
|
||||
|
||||
Name: propagator
|
||||
Version: 20101130
|
||||
Release: alt1
|
||||
Release: alt2
|
||||
|
||||
Summary: 'Early userspace' set of binaries
|
||||
License: GPL
|
||||
@ -40,6 +40,9 @@ make %{?_with_shell:WITH_SHELL=t} %{?_with_splash:WITH_SPLASH=t} libdir=%_libdir
|
||||
%_libdir/%name
|
||||
|
||||
%changelog
|
||||
* Wed Dec 01 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 20101130-alt2
|
||||
- spawning plymouth fixed
|
||||
|
||||
* Tue Nov 30 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 20101130-alt1
|
||||
- plymouth support added
|
||||
- bootsplash support removed
|
||||
|
29
stage1.c
29
stage1.c
@ -104,7 +104,6 @@ void stg1_info_message(char *msg, ...)
|
||||
/************************************************************
|
||||
* spawns a shell on console #2 */
|
||||
static pid_t shell_pid = 0;
|
||||
static pid_t splash_pid = 0;
|
||||
|
||||
static void spawn_shell(void)
|
||||
{
|
||||
@ -155,32 +154,11 @@ static void spawn_shell(void)
|
||||
static void spawn_splash(void)
|
||||
{
|
||||
#ifdef SPAWN_SPLASH
|
||||
int fd;
|
||||
char * splash_name[] = { "/sbin/plymouthd", NULL };
|
||||
char * splash_name[] = { "/sbin/plymouthd", "plymouthd", NULL };
|
||||
|
||||
log_message("spawning a splash screen");
|
||||
fd = open("/dev/null", O_RDWR);
|
||||
if (fd == -1) {
|
||||
log_message("cannot open /dev/null");
|
||||
return;
|
||||
}
|
||||
else if (access(splash_name[0], X_OK)) {
|
||||
log_message("%s doesn't exist", splash_name[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(splash_pid = fork())) {
|
||||
dup2(fd, 0);
|
||||
dup2(fd, 1);
|
||||
dup2(fd, 2);
|
||||
close(fd);
|
||||
setsid();
|
||||
execve(splash_name[0], splash_name, env);
|
||||
log_message("execve of %s failed: %s", splash_name[0], strerror(errno));
|
||||
exit(-1);
|
||||
}
|
||||
if(spawn(splash_name)) sleep(1);
|
||||
|
||||
close(fd);
|
||||
char * av[] = { "/bin/plymouth", "plymouth", "show-splash", NULL };
|
||||
log_message( "%s: %s\n", av[0], av[2] );
|
||||
return spawn(av);
|
||||
@ -377,9 +355,6 @@ void stage1()
|
||||
if (shell_pid != 0)
|
||||
kill(shell_pid, 9);
|
||||
|
||||
if (splash_pid != 0)
|
||||
kill(splash_pid, 9);
|
||||
|
||||
pass_env(4);
|
||||
|
||||
exit(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user