Skip to content
API Documentation
BastionGuard™
BastionGuardRecovery Namespace Reference

Functions

bool is_recovery_boot ()
static void show_recovery_banner (Gtk.Window parent)

Function Documentation

◆ is_recovery_boot()

bool BastionGuardRecovery.is_recovery_boot ( )

Definition at line 24 of file RecoveryMain.vala.

24 {
25 try {
26 string cmdline;
27 FileUtils.get_contents("/proc/cmdline", out cmdline);
28 return "bastionguard.recovery=1" in cmdline;
29 } catch {
30 return false;
31 }
32 }

References is_recovery_boot().

Referenced by is_recovery_boot().

◆ show_recovery_banner()

void BastionGuardRecovery.show_recovery_banner ( Gtk.Window parent)
static

Definition at line 36 of file RecoveryMain.vala.

36 {
37
38 var dlg = new Gtk.MessageDialog(
39 parent,
40 Gtk.DialogFlags.MODAL,
41 Gtk.MessageType.WARNING,
42 Gtk.ButtonsType.OK,
43 "%s",
44 "BastionGuard™ — Modalità Recovery\n\n" +
45 "Il sistema è stato avviato dall'ambiente di recovery.\n\n" +
46 "Tutte le funzionalità sono disponibili:\n" +
47 " • Crea — esegui un backup dal sistema live\n" +
48 " • Ripristina — ripristina uno snapshot esistente\n" +
49 " • Configurazione guidata — configura il dispositivo\n\n" +
50 "Usa il menu tasto-destro del desktop per\n" +
51 "Riavviare o Spegnere il sistema."
52 );
53 dlg.set_title("BastionGuard™ Recovery");
54 dlg.present();
55 }

References show_recovery_banner().

Referenced by show_recovery_banner().