summaryrefslogtreecommitdiffhomepage
path: root/netboot/netconf.go
diff options
context:
space:
mode:
authorPablo Mazzini <pmazzini@gmail.com>2023-05-16 07:16:49 +0100
committerinsomniac <insomniacslk@users.noreply.github.com>2023-09-06 14:29:24 +0200
commitc71a6be05968c3aa1dc7bf1249e908986a71c164 (patch)
tree1fdfe51883ce3639f44515ea3889ab77c27693a9 /netboot/netconf.go
parent01274d66fc98a2f21229adb93909a9ea6cb7e6ca (diff)
os instead of ioutil
Diffstat (limited to 'netboot/netconf.go')
-rw-r--r--netboot/netconf.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/netboot/netconf.go b/netboot/netconf.go
index 698c0d1..6370b5d 100644
--- a/netboot/netconf.go
+++ b/netboot/netconf.go
@@ -3,7 +3,6 @@ package netboot
import (
"errors"
"fmt"
- "io/ioutil"
"net"
"os"
"strings"
@@ -211,7 +210,7 @@ func ConfigureInterface(ifname string, netconf *NetConf) (err error) {
if len(netconf.DNSSearchList) > 0 {
resolvconf += fmt.Sprintf("search %s\n", strings.Join(netconf.DNSSearchList, " "))
}
- if err = ioutil.WriteFile("/etc/resolv.conf", []byte(resolvconf), 0644); err != nil {
+ if err = os.WriteFile("/etc/resolv.conf", []byte(resolvconf), 0644); err != nil {
return fmt.Errorf("could not write resolv.conf file %v", err)
}