Fix build, last merge was a bit broken
This commit is contained in:
parent
294d6a34ca
commit
d3d9ea130c
@ -60,8 +60,8 @@ Calamares::JobResult SetHostNameJob::exec()
|
||||
return Calamares::JobResult::error( tr( "Cannot write hostname to target system" ) );
|
||||
}
|
||||
|
||||
QTextStream out( &hostfile );
|
||||
out << m_hostname << "\n";
|
||||
QTextStream hostfileout( &hostfile );
|
||||
hostfileout << m_hostname << "\n";
|
||||
hostfile.close();
|
||||
|
||||
QFile hostsfile( destDir + "/etc/hosts" );
|
||||
@ -72,13 +72,13 @@ Calamares::JobResult SetHostNameJob::exec()
|
||||
}
|
||||
|
||||
// We also need to write the appropriate entries for /etc/hosts
|
||||
QTextStream out( &hostsfile );
|
||||
QTextStream hostsfileout( &hostsfile );
|
||||
// ipv4 support
|
||||
out << "127.0.0.1" << "\t" << "localhost" << "\n";
|
||||
out << "127.0.1.1" << "\t" << m_hostname << "\n";
|
||||
hostsfileout << "127.0.0.1" << "\t" << "localhost" << "\n";
|
||||
hostsfileout << "127.0.1.1" << "\t" << m_hostname << "\n";
|
||||
// ipv6 support
|
||||
out << "::1" << "\t" << "localhost ip6-localhost ip6-loopback" << "\n";
|
||||
out << "ff02::1 ip6-allnodes" << "\n" << "ff02::2 ip6-allrouters" << "\n";
|
||||
hostsfileout << "::1" << "\t" << "localhost ip6-localhost ip6-loopback" << "\n";
|
||||
hostsfileout << "ff02::1 ip6-allnodes" << "\n" << "ff02::2 ip6-allrouters" << "\n";
|
||||
hostsfile.close();
|
||||
|
||||
return Calamares::JobResult::ok();
|
||||
|
Loading…
Reference in New Issue
Block a user