2020-08-25 16:05:56 +02:00
|
|
|
/* === This file is part of Calamares - <https://calamares.io> ===
|
2016-10-14 01:26:18 +02:00
|
|
|
*
|
2020-08-22 01:19:58 +02:00
|
|
|
* SPDX-FileCopyrightText: 2016 Kevin Kofler <kevin.kofler@chello.at>
|
|
|
|
* SPDX-FileCopyrightText: 2017 Adriaan de Groot <groot@kde.org>
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
2016-10-14 01:26:18 +02:00
|
|
|
*
|
2020-08-25 16:05:56 +02:00
|
|
|
* Calamares is Free Software: see the License-Identifier above.
|
2016-10-14 01:26:18 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DRACUTLUKSCFGJOB_H
|
|
|
|
#define DRACUTLUKSCFGJOB_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QVariantMap>
|
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "CppJob.h"
|
2016-10-14 01:26:18 +02:00
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "utils/PluginFactory.h"
|
2016-10-14 01:26:18 +02:00
|
|
|
|
2020-03-10 02:45:40 +01:00
|
|
|
#include "DllMacro.h"
|
2016-10-14 01:26:18 +02:00
|
|
|
|
|
|
|
class PLUGINDLLEXPORT DracutLuksCfgJob : public Calamares::CppJob
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit DracutLuksCfgJob( QObject* parent = nullptr );
|
2017-09-14 12:34:07 +02:00
|
|
|
virtual ~DracutLuksCfgJob() override;
|
2016-10-14 01:26:18 +02:00
|
|
|
|
|
|
|
QString prettyName() const override;
|
|
|
|
|
|
|
|
Calamares::JobResult exec() override;
|
|
|
|
|
|
|
|
private:
|
2019-09-08 22:20:13 +02:00
|
|
|
static const QLatin1String CONFIG_FILE;
|
2020-01-24 13:08:25 +01:00
|
|
|
static const char* CONFIG_FILE_HEADER;
|
|
|
|
static const char* CONFIG_FILE_CRYPTTAB_KEYFILE_LINE;
|
|
|
|
static const char* CONFIG_FILE_CRYPTTAB_LINE;
|
2019-09-08 22:20:13 +02:00
|
|
|
static const QLatin1String CONFIG_FILE_SWAPLINE;
|
2016-10-14 01:26:18 +02:00
|
|
|
|
|
|
|
static QString rootMountPoint();
|
|
|
|
static QVariantList partitions();
|
|
|
|
static bool isRootEncrypted();
|
2016-11-19 02:30:34 +01:00
|
|
|
static bool hasUnencryptedSeparateBoot();
|
2016-10-14 01:26:18 +02:00
|
|
|
static QString swapOuterUuid();
|
|
|
|
};
|
|
|
|
|
|
|
|
CALAMARES_PLUGIN_FACTORY_DECLARATION( DracutLuksCfgJobFactory )
|
|
|
|
|
2020-01-24 13:08:25 +01:00
|
|
|
#endif // DRACUTLUKSCFGJOB_H
|