diff options
author | Phil Davis <phil.davis@inf.org> | 2014-04-22 11:10:26 -0700 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-04-22 11:10:26 -0700 |
commit | 6f931ad24e218194adfe8e8461d11017eeb7675c (patch) | |
tree | f4ab8021817c55c889d40b148bedff60cbe10c4c /etc/inc/service-utils.inc | |
parent | 635f9eb560bd227982c3be289fb2b138e7f83b3d (diff) | |
download | pfsense-6f931ad24e218194adfe8e8461d11017eeb7675c.zip pfsense-6f931ad24e218194adfe8e8461d11017eeb7675c.tar.gz |
Make sure /usr/local/etc/rc.d exists
On 2.2-ALPHA (i386)built on Mon Apr 21 13:01:11 CDT 2014 (for example) there was /usr/local/etc but not /usr/local/etc/rc.d - when I tried to install bandwidthd, that called write_rcfile() which failed because /usr/local/etc/rc.d did not already exist.
Best to check for it and make it if it does not exist.
(I am guessing that the 2.1.n image builds already had /usr/local/etc/rc.d bnefore any packages were installed, otherwise this problem should have already been an issue prior to 2.2)
Diffstat (limited to 'etc/inc/service-utils.inc')
-rw-r--r-- | etc/inc/service-utils.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index f137160..490724b 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -49,6 +49,7 @@ define("RCFILEPREFIX", "/usr/local/etc/rc.d/"); function write_rcfile($params) { global $g; + safe_mkdir(RCFILEPREFIX); $rcfile_fullname = RCFILEPREFIX . $params['file']; if (!file_exists($rcfile_fullname) && !is_link($rcfile_fullname) && !touch($rcfile_fullname)) return false; |