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