init: do not run $home/lib/profile when cd $home failed

avoiding follow up error messages, which is annoying and
quite common when running a terminal as "none" for testing.
This commit is contained in:
cinap_lenrek 2015-08-05 14:09:02 +02:00
parent 00eb2fa448
commit b89fcf2fe3

View file

@ -144,7 +144,7 @@ rcexec(void)
else if(manual || iscpu)
execl("/bin/rc", "rc", nil);
else if(strcmp(service, "terminal") == 0)
execl("/bin/rc", "rc", "-c", ". /rc/bin/termrc; home=/usr/$user; cd; . ./lib/profile", nil);
execl("/bin/rc", "rc", "-c", ". /rc/bin/termrc; home=/usr/$user; cd && . ./lib/profile", nil);
else
execl("/bin/rc", "rc", nil);
}