Don't fail to create passwd and group files if /etc already exists

This commit is contained in:
Nick Withers
2015-02-20 15:00:47 +11:00
committed by Sebastian Huber
parent c53705c384
commit 5eb27ce409

View File

@@ -61,11 +61,10 @@ static void init_file(const char *name, const char *content)
*/
static void pwdgrp_init(void)
{
int rc;
rc = mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if ( rc != 0 )
return;
/*
* Do the best to create this directory.
*/
mkdir("/etc", S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
/*
* Initialize /etc/passwd