Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448712 - www-servers/nginx-1.2.6: init script fails to create missing directories
Summary: www-servers/nginx-1.2.6: init script fails to create missing directories
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Benedikt Böhm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-26 22:35 UTC by Guillaume Castagnino
Modified: 2012-12-27 06:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nginx init fix (nginx.patch,436 bytes, text/plain)
2012-12-26 22:35 UTC, Guillaume Castagnino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Castagnino 2012-12-26 22:35:38 UTC
Created attachment 333400 [details]
nginx init fix

There is a change in the latested nginx ebuild that stops using keepdir to keep the /var/tmp/nginx/{client,proxy,fastcgi,scgi,uwsgi} directories, and create it within the init script.

Problem: checkpath does not create recursively the directories. But /var/tmp/nginx/ is missing, so creating the {client,proxy,fastcgi,scgi,uwsgi} subdirectories fails (and nginx fails to start):
# /etc/init.d/nginx restart
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * checkpath: mkdir: No such file or directory
 * Checking nginx' configuration ...
nginx: [emerg] mkdir() "/var/tmp/nginx/client" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [emerg] mkdir() "/var/tmp/nginx/client" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
 * failed, please correct errors above                                                                                                                                          [ !! ]
 * ERROR: nginx failed to stop



The fix is quite simple, just adding one checkpath (see attached patch).
Comment 1 Piotr Szymaniak 2012-12-26 22:46:28 UTC
Got the same issue after upgrade.
Comment 2 Benedikt Böhm (RETIRED) gentoo-dev 2012-12-27 06:56:17 UTC
grr, stupid checkpath ... fixed, thanks!