浏览代码

优化修改代码

niujiuru 1 月之前
父节点
当前提交
343800c501
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 2 0
      networkd.service/main.go
  2. 2 0
      timesyncd.service/main.go

+ 2 - 0
networkd.service/main.go

@@ -36,7 +36,9 @@ type program struct {
 
 // Start should not block. Do the actual work async.
 func (p *program) Start(s service.Service) error {
+	baseapp.SetOptDirs(true, true, false, false)
 	baseapp.InitPath()
+
 	logCfgFile, err := servicelib.EnsureDefaultLogConfig()
 	if err != nil {
 		return err

+ 2 - 0
timesyncd.service/main.go

@@ -38,7 +38,9 @@ type program struct {
 
 // Start should not block. Do the actual work async.
 func (p *program) Start(s service.Service) error {
+	baseapp.SetOptDirs(true, false, false, false)
 	baseapp.InitPath()
+
 	logCfgFile, err := servicelib.EnsureDefaultLogConfig()
 	if err != nil {
 		return err