From 377bfc3ad26a02eb4068366ba106427c3874fde8 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 17 Sep 2013 17:56:38 +0000 Subject: [PATCH] Create LinkRepository during runtime init --- runtime.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/runtime.go b/runtime.go index 0225a5bd2..040f52916 100644 --- a/runtime.go +++ b/runtime.go @@ -453,11 +453,6 @@ func NewRuntime(config *DaemonConfig) (*Runtime, error) { } } runtime.UpdateCapabilities(false) - links, err := NewLinkRepository("") - if err != nil { - return nil, err - } - runtime.links = links return runtime, nil } @@ -487,6 +482,11 @@ func NewRuntimeFromDirectory(config *DaemonConfig) (*Runtime, error) { if err != nil { return nil, err } + links, err := NewLinkRepository("") + if err != nil { + return nil, err + } + runtime := &Runtime{ repository: runtimeRepo, containers: list.New(), @@ -497,6 +497,7 @@ func NewRuntimeFromDirectory(config *DaemonConfig) (*Runtime, error) { capabilities: &Capabilities{}, volumes: volumes, config: config, + links: links, } if err := runtime.restore(); err != nil {