calamares/calamares-3.2.17.1-dont-backup-dotfiles.patch

25 lines
1016 B
Diff
Raw Normal View History

--- calamares-3.2.17.1/src/modules/users/CreateUserJob.cpp.orig 2019-12-21 18:59:25.196000000 +0100
+++ calamares-3.2.17.1/src/modules/users/CreateUserJob.cpp 2019-12-21 18:59:51.859000000 +0100
@@ -130,21 +130,6 @@
}
}
- // If we're looking to reuse the contents of an existing /home
- if ( gs->value( "reuseHome" ).toBool() )
- {
- QString shellFriendlyHome = "/home/" + m_userName;
- QDir existingHome( destDir.absolutePath() + shellFriendlyHome );
- if ( existingHome.exists() )
- {
- QString backupDirName = "dotfiles_backup_" + QDateTime::currentDateTime().toString( "yyyy-MM-dd_HH-mm-ss" );
- existingHome.mkdir( backupDirName );
-
- CalamaresUtils::System::instance()->targetEnvCall(
- { "sh", "-c", "mv -f " + shellFriendlyHome + "/.* " + shellFriendlyHome + "/" + backupDirName } );
- }
- }
-
cDebug() << "[CREATEUSER]: creating user";
QStringList useradd { "useradd", "-m", "-U" };