update installer script
Some checks failed
CI / test-build (push) Failing after 2m16s

This commit is contained in:
2025-12-15 01:32:41 +07:00
parent 921e7219ab
commit 7ac7e77f1d
3 changed files with 37 additions and 7 deletions

View File

@@ -17,8 +17,16 @@ type ISCSIService struct {
// NewISCSIService creates a new iSCSI service manager
func NewISCSIService() *ISCSIService {
// Try targetcli first, fallback to targetcli-fb
targetcliPath := "targetcli"
if _, err := exec.LookPath("targetcli"); err != nil {
if _, err := exec.LookPath("targetcli-fb"); err == nil {
targetcliPath = "targetcli-fb"
}
}
return &ISCSIService{
targetcliPath: "targetcli",
targetcliPath: targetcliPath,
}
}