Skip to content

Commit

Permalink
Preserve network configuration provided via kernel boot line (#997)
Browse files Browse the repository at this point in the history
## Problem

Network configuration provided by kernel boot line is lost

- [*bsc1210541*](https://bugzilla.suse.com/show_bug.cgi?id=1210541)


## Solution

Even NM's runtime configuration is copied to the target at the end of
installation


## Testing

- *Tested manually*
  • Loading branch information
mchf authored Jan 16, 2024
2 parents 212508e + e296e37 commit d805b37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions service/lib/agama/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def install
attr_reader :logger

ETC_NM_DIR = "/etc/NetworkManager"
RUN_NM_DIR = "/run/NetworkManager"
private_constant :ETC_NM_DIR

def enable_service
Expand All @@ -68,6 +69,13 @@ def enable_service
def copy_files
return unless Dir.exist?(ETC_NM_DIR)

# runtime configuration is copied first, so in case of later modification
# on same interface it gets overwriten (bsc#1210541).
copy_directory(
File.join(RUN_NM_DIR, "system-connections"),
File.join(Yast::Installation.destdir, ETC_NM_DIR, "system-connections")
)

copy_directory(
File.join(ETC_NM_DIR, "system-connections"),
File.join(Yast::Installation.destdir, ETC_NM_DIR, "system-connections")
Expand Down
5 changes: 5 additions & 0 deletions service/package/rubygem-agama.changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
Tue Jan 16 10:49:14 UTC 2024 - Michal Filka <[email protected]>

- bsc#1210541, gh#openSUSE/agama#516
- copy NM's runtime config created on dracut's request to the target
-------------------------------------------------------------------
Thu Jan 11 15:32:44 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>

- Handle the encoding included in the UILocale D-Bus property
Expand Down

0 comments on commit d805b37

Please sign in to comment.