mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-09-23 11:57:07 +00:00
committed by
Itxaka
parent
dd6d5a662b
commit
745c51da9b
@@ -4,8 +4,8 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/sdk/unstructured"
|
|
||||||
"github.com/google/shlex"
|
"github.com/google/shlex"
|
||||||
|
"github.com/kairos-io/kairos/sdk/unstructured"
|
||||||
)
|
)
|
||||||
|
|
||||||
func DotToYAML(file string) ([]byte, error) {
|
func DotToYAML(file string) ([]byte, error) {
|
||||||
|
@@ -4,7 +4,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
. "github.com/c3os-io/c3os/pkg/machine"
|
. "github.com/kairos-io/kairos/pkg/machine"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
)
|
)
|
||||||
|
@@ -6,11 +6,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/pkg/machine/openrc"
|
|
||||||
"github.com/c3os-io/c3os/pkg/machine/systemd"
|
|
||||||
"github.com/denisbrodbeck/machineid"
|
"github.com/denisbrodbeck/machineid"
|
||||||
|
"github.com/kairos-io/kairos/pkg/machine/openrc"
|
||||||
|
"github.com/kairos-io/kairos/pkg/machine/systemd"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/pkg/utils"
|
"github.com/kairos-io/kairos/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Service interface {
|
type Service interface {
|
||||||
@@ -117,11 +117,11 @@ func UUID() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CreateSentinel(f string) error {
|
func CreateSentinel(f string) error {
|
||||||
return ioutil.WriteFile(fmt.Sprintf("/usr/local/.c3os/sentinel_%s", f), []byte{}, os.ModePerm)
|
return ioutil.WriteFile(fmt.Sprintf("/usr/local/.kairos/sentinel_%s", f), []byte{}, os.ModePerm)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SentinelExist(f string) bool {
|
func SentinelExist(f string) bool {
|
||||||
if _, err := os.Stat(fmt.Sprintf("/usr/local/.c3os/sentinel_%s", f)); err == nil {
|
if _, err := os.Stat(fmt.Sprintf("/usr/local/.kairos/sentinel_%s", f)); err == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/pkg/utils"
|
"github.com/kairos-io/kairos/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServiceUnit struct {
|
type ServiceUnit struct {
|
||||||
|
@@ -7,7 +7,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/c3os-io/c3os/pkg/utils"
|
"github.com/kairos-io/kairos/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServiceUnit struct {
|
type ServiceUnit struct {
|
||||||
|
Reference in New Issue
Block a user