From b60cbe5a55add00e6d99ce986b6dbd9e3d797298 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 10 Oct 2017 19:47:21 -0700 Subject: [PATCH] move constant --- src/config.js | 4 ++-- src/paths.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index 3f8a41442..dacf6b5c1 100644 --- a/src/config.js +++ b/src/config.js @@ -235,6 +235,6 @@ function tlsKey() { } function hasIPv6() { - // require here to avoid cyclic dependencies, it is cached anyways - return fs.existsSync(require('./paths.js').IPV6_PROC_FILE); + const IPV6_PROC_FILE = '/proc/net/if_inet6'; + return fs.existsSync(IPV6_PROC_FILE); } \ No newline at end of file diff --git a/src/paths.js b/src/paths.js index e1dfb57cb..6dd863b21 100644 --- a/src/paths.js +++ b/src/paths.js @@ -19,7 +19,6 @@ exports = module.exports = { ADDON_CONFIG_DIR: path.join(config.baseDir(), 'platformdata/addons'), COLLECTD_APPCONFIG_DIR: path.join(config.baseDir(), 'platformdata/collectd/collectd.conf.d'), LOGROTATE_CONFIG_DIR: path.join(config.baseDir(), 'platformdata/logrotate.d'), - IPV6_PROC_FILE: '/proc/net/if_inet6', NGINX_CONFIG_DIR: path.join(config.baseDir(), 'platformdata/nginx'), NGINX_APPCONFIG_DIR: path.join(config.baseDir(), 'platformdata/nginx/applications'), NGINX_CERT_DIR: path.join(config.baseDir(), 'platformdata/nginx/cert'),