mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-17 07:17:41 +00:00
committed by
Itxaka
parent
bb73b8164c
commit
5bee05cccc
@@ -6,11 +6,11 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/c3os-io/c3os/pkg/machine/openrc"
|
||||
"github.com/c3os-io/c3os/pkg/machine/systemd"
|
||||
"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 {
|
||||
@@ -117,11 +117,11 @@ func UUID() string {
|
||||
}
|
||||
|
||||
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 {
|
||||
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 false
|
||||
|
Reference in New Issue
Block a user