parent
b697461497
commit
43eb664e7d
@ -44,6 +44,17 @@ InitramfsJob::exec()
|
||||
CalamaresUtils::UMask m( CalamaresUtils::UMask::Safe );
|
||||
|
||||
cDebug() << "Updating initramfs with kernel" << m_kernel;
|
||||
|
||||
// First make sure we generate a safe initramfs with suitable permissions.
|
||||
static const char confFile[] = "/etc/initramfs-tools/conf.d/calamares-safe-initramfs.conf";
|
||||
static const char contents[] = "UMASK=0077\n";
|
||||
if ( CalamaresUtils::System::instance()->createTargetFile( confFile, QByteArray( contents ) ).isEmpty() )
|
||||
{
|
||||
cWarning() << Logger::SubEntry << "Could not configure safe UMASK for initramfs.";
|
||||
// But continue anyway.
|
||||
}
|
||||
|
||||
// And then do the ACTUAL work.
|
||||
auto r = CalamaresUtils::System::instance()->targetEnvCommand(
|
||||
{ "update-initramfs", "-k", m_kernel, "-c", "-t" }, QString(), QString(), 0 );
|
||||
return r.explainProcess( "update-initramfs", 10 );
|
||||
|
Loading…
Reference in New Issue
Block a user