check /bin/plymouth before exec
This commit is contained in:
parent
e65ccbb240
commit
fd2a83d725
9
init.c
9
init.c
@ -344,7 +344,7 @@ void unmount_filesystems(void)
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct stat rst, cst, ist;
|
||||
struct stat rst, cst, ist, pst;
|
||||
struct statfs sfs;
|
||||
pid_t pid, klogpid, udevpid;
|
||||
sigset_t sig;
|
||||
@ -516,9 +516,10 @@ int main(int argc, char **argv)
|
||||
/* First, change to the new root directory */
|
||||
if (chdir(STAGE2_LOCATION))
|
||||
fatal("chdir to new root");
|
||||
|
||||
char * plymouth[] = { "/bin/plymouth", "plymouth", "--newroot=/root", NULL };
|
||||
spawn(plymouth);
|
||||
if (stat("/bin/plymouth", &pst) == 0 ) {
|
||||
char * plymouth[] = { "/bin/plymouth", "plymouth", "--newroot=/root", NULL };
|
||||
spawn(plymouth);
|
||||
}
|
||||
|
||||
/* This is a potentially highly destructive program. Take some
|
||||
extra precautions. */
|
||||
|
Loading…
Reference in New Issue
Block a user