2021-01-11 11:19:10 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
extern bool RECOVERY_MODE;
|
2022-05-29 07:39:44 +02:00
|
|
|
extern std::atomic<ino_t> pkg_xml_ino;
|
2021-09-16 14:27:34 +02:00
|
|
|
|
2023-03-16 12:07:00 +01:00
|
|
|
dev_t find_preinit_device();
|
2021-01-11 11:19:10 +01:00
|
|
|
void unlock_blocks();
|
|
|
|
void reboot();
|
2021-08-12 12:26:54 +02:00
|
|
|
void start_log_daemon();
|
2021-01-11 11:19:10 +01:00
|
|
|
void setup_logfile(bool reset);
|
2022-06-18 01:36:03 +02:00
|
|
|
std::string read_certificate(int fd, int version = -1);
|
2021-01-11 11:19:10 +01:00
|
|
|
|
|
|
|
// Module stuffs
|
|
|
|
void handle_modules();
|
2023-02-26 03:11:25 +01:00
|
|
|
void load_modules();
|
2021-01-11 11:19:10 +01:00
|
|
|
void disable_modules();
|
|
|
|
void remove_modules();
|
|
|
|
void exec_module_scripts(const char *stage);
|
|
|
|
|
|
|
|
// Scripting
|
|
|
|
void exec_script(const char *script);
|
|
|
|
void exec_common_scripts(const char *stage);
|
2021-10-13 13:52:02 +02:00
|
|
|
void exec_module_scripts(const char *stage, const std::vector<std::string_view> &modules);
|
2021-01-11 11:19:10 +01:00
|
|
|
void install_apk(const char *apk);
|
2022-05-20 13:37:37 +02:00
|
|
|
void uninstall_pkg(const char *pkg);
|
2022-05-24 14:21:36 +02:00
|
|
|
void clear_pkg(const char *pkg, int user_id);
|
2021-01-11 11:19:10 +01:00
|
|
|
[[noreturn]] void install_module(const char *file);
|