Skip to content

Commit

Permalink
fix: Missing base root path on SystemD target dir
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Aug 7, 2023
1 parent 4570dc2 commit 391162f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,10 @@ ExecStart=%s
return err
}

if _, err := os.Stat(SystemDTargetDir); os.IsNotExist(err) {
err = os.MkdirAll(SystemDTargetDir, 0755)
if err != nil {
PrintVerbose("ABSystem.GenerateMountpointsSystemDUnit:err(3): %s", err)
return err
}
err = os.MkdirAll(rootPath+SystemDTargetDir, 0755)
if err != nil {
PrintVerbose("ABSystem.GenerateMountpointsSystemDUnit:err(3): %s", err)
return err
}

err = os.Symlink(rootPath+MountUnitDir+MountUnitFile, rootPath+SystemDTargetDir+MountUnitFile)
Expand Down

0 comments on commit 391162f

Please sign in to comment.