From 1a720a85ec8ea9a4505aa3db2b991e4e45f3abfa Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Sat, 14 Feb 2015 09:33:58 -0700 Subject: [PATCH] Move state dir --- init/init.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/init/init.go b/init/init.go index b15efff4..62c50530 100644 --- a/init/init.go +++ b/init/init.go @@ -16,8 +16,7 @@ import ( ) const ( - STATE string = "/var/lib/rancher/state" - DOCKER string = "/var/lib/docker" + STATE string = "/var" ) var ( @@ -25,13 +24,14 @@ var ( "/bin", "/dev", "/dev/pts", - "/etc/ssl/certs/ca-certificates.crt", + "/etc/ssl/certs", "/proc", "/sbin", "/sys", "/usr/bin", - DOCKER, - STATE, + "/var/run", + } + statedirs []string = []string{ "/var/run", } mounts [][]string = [][]string{ @@ -278,6 +278,9 @@ func RunInit() error { mountCgroups, loadModules, mountState, + func(cfg *config.Config) error { + return createDirs(statedirs...) + }, sysInit, }