BUGFIX on hostid reading : remove trailing \n

This commit is contained in:
yo 2022-04-05 21:43:11 +02:00
parent 7dbbf8a757
commit 0f97270a6a

View File

@ -24,6 +24,8 @@ func NewJailConfig() JailConfig {
hostid, err := ioutil.ReadFile("/etc/hostid") hostid, err := ioutil.ReadFile("/etc/hostid")
if err != nil { if err != nil {
hostid = []byte("12345678-abcd-ef98-7654-321012345678") hostid = []byte("12345678-abcd-ef98-7654-321012345678")
} else {
hostid = []byte(strings.Replace(string(hostid), "\n", "", -1))
} }
jc.Allow_chflags = 0 jc.Allow_chflags = 0