From 2d8ec52f831981a54b1672411e6e3e266f730acf Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Tue, 21 Apr 2015 10:51:57 +0200 Subject: [PATCH] rkt, common: Move default config paths to common --- common/common.go | 3 +++ rkt/config/config.go | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/common/common.go b/common/common.go index 1860faa..f609a26 100644 --- a/common/common.go +++ b/common/common.go @@ -39,6 +39,9 @@ const ( MetadataServicePort = 2375 MetadataServiceRegSock = "/run/rkt/metadata-svc.sock" + + DefaultCustomConfigDir = "/etc/rkt" + DefaultSystemConfigDir = "/usr/lib/rkt" ) // Stage1ImagePath returns the path where the stage1 app image (unpacked ACI) is rooted, diff --git a/rkt/config/config.go b/rkt/config/config.go index 95a5860..271a4c4 100644 --- a/rkt/config/config.go +++ b/rkt/config/config.go @@ -23,6 +23,8 @@ import ( "path/filepath" "sort" "strings" + + "github.com/coreos/rkt/common" ) // Headerer is an interface for getting additional HTTP headers to use @@ -56,8 +58,8 @@ var ( // Default paths for vendor and custom configuration const ( - DefaultVendorPath = "/usr/lib/rkt" - DefaultCustomPath = "/etc/rkt" + DefaultVendorPath = common.DefaultSystemConfigDir + DefaultCustomPath = common.DefaultCustomConfigDir ) func addParser(kind, version string, parser configParser) {