Browse Source

优化修改代码

niujiuru 1 tháng trước cách đây
mục cha
commit
343800c501
2 tập tin đã thay đổi với 4 bổ sung0 xóa
  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