do not create init-dir if not needed
do not create init-dir if not needed

commit 56f77d5ade945b3b8816a6c8acb328b7c6dce9a7
added support for cpu-rt-period and cpu-rt-runtime,
but always initialized the cgroup path, even if not
used.

As a result, containers failed to start on a
read-only filesystem.

This patch only creates the cgroup path if
one of these options is set.

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

duglin/docker,moby/moby,catinthesky/docker,x1022as/docker,trebonian/docker,maxamillion/docker,shishir-a412ed/docker,charleszheng44/moby,madhanrm/docker,bonczj/moby-json-file-logger,paralin/docker,tophj-ibm/moby,amatsus/docker,Mokolea/docker,resin-io/docker,dccurtis/docker,mikebrow/docker,mikebrow/docker,kolyshkin/moby,jameszhan/docker,jlhawn/docker,tklauser/docker,jimjag/docker,jlhawn/docker,lixiaobing1/docker,tophj-ibm/docker,konstruktoid/docker-upstream,akira-baruah/docker,konstruktoid/docker-1,YuPengZTE/docker,thtanaka/docker,prertik/docker,mike1729/docker,pramodhkp/moby,dsheets/moby,crosbymichael/docker,mkumatag/docker,hqhq/moby,cpuguy83/docker,dmcgowan/docker,konstruktoid/docker-upstream,tonistiigi/docker,Syntaxide/docker,mkumatag/docker,yosifkit/docker,JMesser81/docker,kojiromike/docker,shhsu/docker,srust/docker,madhanrm/docker,jwhonce/docker,konstruktoid/docker-1,nawawi/docker,ibuildthecloud/docker,ibuildthecloud/docker,sdurrheimer/docker,yongtang/docker,tophj-ibm/docker,mkumatag/docker,laijs/docker,prertik/docker,cpuguy83/docker,ColinHebert/docker,coreos/docker,jwhonce/docker,docker/docker,estesp/docker,vdemeester/docker,jimjag/docker,dsheets/moby,cpuguy83/docker,erikh/docker,ripcurld0/moby,ffoysal/docker,SvenDowideit/docker,djs55/docker,dims/docker,tianon/docker,whuwxl/docker,flavio/docker,trebonian/docker,naveed-jamil-tenpearls/moby,laijs/docker,naveed-jamil-tenpearls/moby,liaoqingwei/docker,mtesselH/docker,ndeloof/docker,jimjag/docker,erikh/docker,mtesselH/docker,dgageot/docker,sarnautov/moby,estesp/docker,cyphar/docker,jthelin/docker,Mokolea/docker,noironetworks/docker,paralin/docker,mikebrow/docker,x1022as/docker,ColinHebert/docker,gschaetz/moby,coolljt0725/docker,thaJeztah/docker,mstanleyjones/docker,POLJM242/docker,unclejack/docker,tmp6154/docker,coreos/docker,miminar/docker,srust/docker,rancher/docker,liaoqingwei/docker,KingEmet/docker,jameszhan/docker,moby/moby,scotttlin/docker,flavio/docker,haveatry/docker,kencochrane/docker,yongtang/docker,nawawi/docker,AkihiroSuda/docker,dgageot/docker,konstruktoid/docker-upstream,PatrickLang/moby,mixja/docker,alfred-landrum/docker,haveatry/docker,Mokolea/docker,raja-sami-10p/moby,rhatdan/docker,dims/docker,allencloud/docker,cyphar/docker,diogomonica/docker,PatrickLang/moby,dmcgowan/docker,imkin/moby,gnailuy/docker,JMesser81/docker,Ramzec/docker,kolyshkin/moby,nawawi/docker,johnstep/moby-moby,jameszhan/docker,tophj-ibm/docker,yummypeng/docker,jwhonce/docker,moby/moby,moul/docker,nawawi/docker,yummypeng/docker,amatsus/docker,johnstep/moby-moby,bearstech/moby,moby/moby,gnailuy/docker,docker/docker,laijs/moby,mike1729/docker,pradipd/moby,SvenDowideit/docker,rremer/moby,unclejack/docker,allencloud/docker,docker/docker,resin-io/docker,yasiramin10p/moby,madhanrm/docker,gjaskiewicz/moby,darrenstahlmsft/docker,moypray/docker,dgageot/docker,flavio/docker,ripcurld0/moby,paralin/docker,gjaskiewicz/moby,maxamillion/docker,yasiramin10p/moby,mahak/docker,PatrickLang/moby,YuPengZTE/docker,lixiaobing1/docker,djs55/docker,flavio/docker,sdurrheimer/docker,kencochrane/docker,xuxinkun/docker,rremer/moby,kojiromike/docker,AkihiroSuda/docker,laijs/moby,trebonian/docker,tonistiigi/docker,jimjag/docker,kolyshkin/docker,sterchelen/docker,miminar/docker,fcrisciani/docker,jvanz/docker,gschaetz/moby,sterchelen/docker,darrenstahlmsft/docker,qudongfang/docker,tophj-ibm/moby,yosifkit/docker,gjaskiewicz/moby,Syntaxide/docker,pradipd/moby,AkihiroSuda/docker,rremer/moby,noironetworks/docker,ibuildthecloud/docker,lixiaobing1/docker,dims/docker,prertik/docker,catinthesky/docker,darrenstahlmsft/docker,coolljt0725/docker,pramodhkp/moby,erikstmartin/docker,fcrisciani/docker,KarthikNayak/docker,michael-holzheu/docker,moul/docker,lixiaobing10051267/docker,Ramzec/docker,q384566678/docker,noironetworks/docker,duglin/docker,michael-holzheu/docker,danyalKhaliq10p/moby,jlhawn/docker,KarthikNayak/docker,crosbymichael/docker,raja-sami-10p/moby,qudongfang/docker,ffoysal/docker,ibuildthecloud/docker,imkin/moby,tklauser/docker,liaoqingwei/docker,SvenDowideit/docker,shhsu/docker,tklauser/docker,bearstech/moby,KingEmet/docker,darrenstahlmsft/moby,rancher/docker,JMesser81/docker,nalind/docker,erikstmartin/docker,rhatdan/docker,qudongfang/docker,diogomonica/docker,laijs/moby,justincormack/docker,kencochrane/docker,rancher/docker,maxamillion/docker,coolljt0725/docker,nalind/docker,mtesselH/docker,johnstep/moby-moby,thtanaka/docker,sarnautov/moby,gnailuy/docker,whuwxl/docker,thaJeztah/docker,lixiaobing10051267/docker,tmp6154/docker,moul/docker,naveed-jamil-tenpearls/moby,hqhq/moby,Mokolea/docker,erikstmartin/docker,mahak/docker,kolyshkin/moby,darrenstahlmsft/moby,justincormack/docker,mikedougherty/docker,hqhq/moby,djs55/docker,ripcurld0/moby,laijs/docker,bearstech/moby,thaJeztah/docker,ndeloof/docker,bonczj/moby-json-file-logger,xuxinkun/docker,akira-baruah/docker,raja-sami-10p/moby,yongtang/docker,HideoYamauchi/docker,pradipd/moby,vdemeester/docker,mstanleyjones/docker,darrenstahlmsft/moby,duglin/docker,mike1729/docker,mstanleyjones/docker,miminar/docker,lixiaobing10051267/docker,unclejack/docker,xuxinkun/docker,tianon/docker,shhsu/docker,thaJeztah/docker,charleszheng44/moby,POLJM242/docker,cpuguy83/docker,coreos/docker,konstruktoid/docker-upstream,rhatdan/docker,ColinHebert/docker,mixja/docker,Ramzec/docker,diogomonica/docker,amatsus/docker,gschaetz/moby,shishir-a412ed/docker,danyalKhaliq10p/moby,mikedougherty/docker,yosifkit/docker,kojiromike/docker,alfred-landrum/docker,dmcgowan/docker,alfred-landrum/docker,nalind/docker,dperny/docker,catinthesky/docker,ibuildthecloud/docker,gnailuy/docker,michael-holzheu/docker,ffoysal/docker,scotttlin/docker,kolyshkin/docker,paralin/docker,konstruktoid/docker-1,pramodhkp/moby,yummypeng/docker,estesp/docker,scotttlin/docker,yasiramin10p/moby,jthelin/docker,HideoYamauchi/docker,charleszheng44/moby,YuPengZTE/docker,trebonian/docker,fcrisciani/docker,q384566678/docker,jvanz/docker,AkihiroSuda/docker,whuwxl/docker,mixja/docker,jvanz/docker,dperny/docker,bonczj/moby-json-file-logger,dsheets/moby,sarnautov/moby,dccurtis/docker,vdemeester/docker,Ramzec/docker,imkin/moby,moul/docker,dperny/docker,sdurrheimer/docker,thtanaka/docker,mahak/docker,tmp6154/docker,tonistiigi/docker,haveatry/docker,resin-io/docker,crosbymichael/docker,q384566678/docker,justincormack/docker,dccurtis/docker,shishir-a412ed/docker,nalind/docker,sterchelen/docker,mahak/docker,srust/docker,allencloud/docker,bearstech/moby,KingEmet/docker,danyalKhaliq10p/moby,Syntaxide/docker,ndeloof/docker,erikh/docker,moypray/docker,tophj-ibm/moby,x1022as/docker,yosifkit/docker,mikedougherty/docker,moypray/docker,KarthikNayak/docker,HideoYamauchi/docker,cyphar/docker