Mageia Bugzilla – Attachment 1143 Details for
Bug 2983
drakx-net should write (& read) /etc/hostname too for systemd
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
update hostname in /etc/hostname
drakx-net_network_write_hostname.patch (text/plain), 746 bytes, created by
Luc Menut
on 2011-11-27 22:57:41 CET
(
hide
)
Description:
update hostname in /etc/hostname
Filename:
MIME Type:
Creator:
Luc Menut
Created:
2011-11-27 22:57:41 CET
Size:
746 bytes
patch
obsolete
>Index: lib/network/network.pm >=================================================================== >--- lib/network/network.pm (révision 2225) >+++ lib/network/network.pm (copie de travail) >@@ -15,6 +15,7 @@ > use log; > > our $network_file = "/etc/sysconfig/network"; >+my $hostname_file = "/etc/hostname"; > my $resolv_file = "/etc/resolv.conf"; > my $tmdns_file = "/etc/tmdns.conf"; > our $wireless_d = "/etc/sysconfig/network-scripts/wireless.d"; >@@ -290,6 +291,7 @@ > my ($hostname) = @_; > > addVarsInSh($::prefix . $network_file, { HOSTNAME => $hostname }, qw(HOSTNAME)); >+ output($::prefix . $hostname_file, $hostname . "\n") if $hostname; > > add2hosts("localhost", "127.0.0.1"); > add2hosts($hostname, "127.0.0.1") if $hostname;
Index: lib/network/network.pm =================================================================== --- lib/network/network.pm (révision 2225) +++ lib/network/network.pm (copie de travail) @@ -15,6 +15,7 @@ use log; our $network_file = "/etc/sysconfig/network"; +my $hostname_file = "/etc/hostname"; my $resolv_file = "/etc/resolv.conf"; my $tmdns_file = "/etc/tmdns.conf"; our $wireless_d = "/etc/sysconfig/network-scripts/wireless.d"; @@ -290,6 +291,7 @@ my ($hostname) = @_; addVarsInSh($::prefix . $network_file, { HOSTNAME => $hostname }, qw(HOSTNAME)); + output($::prefix . $hostname_file, $hostname . "\n") if $hostname; add2hosts("localhost", "127.0.0.1"); add2hosts($hostname, "127.0.0.1") if $hostname;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2983
: 1143