Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15:Update
google-guest-agent.18997
dont_overwrite_ifcfg.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dont_overwrite_ifcfg.patch of Package google-guest-agent.18997
commit 4000e2ceeaf2f7b1c6428bde88b619a3a56acdfd Author: Joachim Gleissner <jgleissner@suse.com> Date: Thu Oct 15 17:23:34 2020 +0100 do not overwrite ifcfg files on SLES diff --git a/google_guest_agent/addresses.go b/google_guest_agent/addresses.go index 6326ff2..3080142 100644 --- a/google_guest_agent/addresses.go +++ b/google_guest_agent/addresses.go @@ -534,7 +534,12 @@ func enableSLESInterfaces(interfaces []string) error { var priority = 10100 for _, iface := range interfaces { var ifcfg *os.File - ifcfg, err = os.Create("/etc/sysconfig/network/ifcfg-" + iface) + filename := "/etc/sysconfig/network/ifcfg-" + iface + _, err = os.Stat(filename) + if ! os.IsNotExist(err) { + return nil + } + ifcfg, err = os.Create(filename) if err != nil { return err }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor