2021-01-11 10:19:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
extern bool RECOVERY_MODE;
|
2022-05-29 05:39:44 +00:00
|
|
|
extern std::atomic<ino_t> pkg_xml_ino;
|
2021-09-16 12:27:34 +00:00
|
|
|
|
2021-01-11 10:19:10 +00:00
|
|
|
void unlock_blocks();
|
|
|
|
void reboot();
|
2021-08-12 10:26:54 +00:00
|
|
|
void start_log_daemon();
|
2021-01-11 10:19:10 +00:00
|
|
|
void setup_logfile(bool reset);
|
2022-06-17 23:36:03 +00:00
|
|
|
std::string read_certificate(int fd, int version = -1);
|
2021-01-11 10:19:10 +00:00
|
|
|
|
|
|
|
// Module stuffs
|
|
|
|
void handle_modules();
|
|
|
|
void magic_mount();
|
|
|
|
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 11:52:02 +00:00
|
|
|
void exec_module_scripts(const char *stage, const std::vector<std::string_view> &modules);
|
2021-01-11 10:19:10 +00:00
|
|
|
void install_apk(const char *apk);
|
2022-05-20 11:37:37 +00:00
|
|
|
void uninstall_pkg(const char *pkg);
|
2022-05-24 12:21:36 +00:00
|
|
|
void clear_pkg(const char *pkg, int user_id);
|
2021-01-11 10:19:10 +00:00
|
|
|
[[noreturn]] void install_module(const char *file);
|