fixed a lot of indentions
added a administration password to initialization
This commit is contained in:
parent
28380202b9
commit
b91e2da4d1
|
@ -283,6 +283,10 @@ function init_cryptobox_part1()
|
||||||
create_partitions "$device"
|
create_partitions "$device"
|
||||||
create_config "$device"
|
create_config "$device"
|
||||||
) >>"$LOG_FILE" 2>&1
|
) >>"$LOG_FILE" 2>&1
|
||||||
|
# read the admin-pw from the first line of input
|
||||||
|
local admin_pw
|
||||||
|
read admin_pw
|
||||||
|
config_set_value admin_pw "$admin_pw"
|
||||||
# the output of create_crypto may NOT be redirected - this would prevent cryptsetup from
|
# the output of create_crypto may NOT be redirected - this would prevent cryptsetup from
|
||||||
# reading the passphrase from stdin
|
# reading the passphrase from stdin
|
||||||
log_msg "Creating the crypto partition ..."
|
log_msg "Creating the crypto partition ..."
|
||||||
|
@ -359,7 +363,7 @@ case "$ACTION" in
|
||||||
ifconfig $NET_IFACE down
|
ifconfig $NET_IFACE down
|
||||||
;;
|
;;
|
||||||
services-up )
|
services-up )
|
||||||
/etc/init.d/thttpd start
|
# is something special necessary?
|
||||||
;;
|
;;
|
||||||
services-down )
|
services-down )
|
||||||
/etc/init.d/samba stop
|
/etc/init.d/samba stop
|
||||||
|
|
|
@ -1,194 +1,201 @@
|
||||||
Lang {
|
Lang {
|
||||||
|
|
||||||
Name = Deutsch
|
Name = Deutsch
|
||||||
|
|
||||||
Title {
|
Title {
|
||||||
Top = Die CryptoBox
|
Top = Die CryptoBox
|
||||||
Slogan = Privatspähre für alle!
|
Slogan = Privatspähre für alle!
|
||||||
Init = Initialisierung der CryptoBox
|
Init = Initialisierung der CryptoBox
|
||||||
Mount = Aktivierung der Crypto-Daten
|
Mount = Aktivierung der Crypto-Daten
|
||||||
Umount = Deaktivierung der Crypto-Daten
|
Umount = Deaktivierung der Crypto-Daten
|
||||||
Config = Konfiguration der CryptoBox
|
Config = Konfiguration der CryptoBox
|
||||||
Log = Protokoll der CryptoBox
|
Log = Protokoll der CryptoBox
|
||||||
ShutDown = System
|
ShutDown = System
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Text {
|
|
||||||
EnterNewPassword = Das neue Passwort eingeben:
|
|
||||||
EnterSamePassword = Das neue Passwort wiederholen:
|
|
||||||
InitWarning = Bei der Initialisierung werden ALLE DATEN auf der Festplatte GELÖSCHT!
|
|
||||||
InitDescription = Dieser Schritt ist nur einmalig vor der ersten Nutzung notwendig.<br>Für den täglichen Gebrauch muessen sie das verschlüsselte Dateisystem lediglich aktivieren und deaktivieren
|
|
||||||
ConfirmInitHint = Um zu bestätigen, dass sie wissen, was sie tun, tippen sie hier bitte exakt Folgendes ein:
|
|
||||||
ConfirmInit = ja, loesche alle Daten!
|
|
||||||
PartitionInfo = Derzeitige Partitionierung der Festplatte:
|
|
||||||
IPAddress = Netwerk-Adresse (IP) der CryptoBox:
|
|
||||||
TimeOut = Zeitabschaltung des Crypto-Dateisystems (in Minuten):
|
|
||||||
EmptyLog = Das Logbuch der CryptoBox ist leer.
|
|
||||||
SelectLanguage = Spracheinstellung:
|
|
||||||
RedirectNote = Klicken sie hier, falls ihr Browser die automatische Weiterleitung nicht unterstützt.
|
|
||||||
ProjectHomePage = Projekt-Seite
|
|
||||||
ProjectNote = Die CryptoBox ist ein Projekt von
|
|
||||||
DoUmount = Deaktivierung des verschlüsselten Dateisystems
|
|
||||||
DoMount = Aktivierung des verschlüsselten Dateisystems
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Button {
|
|
||||||
DoInit = CryptoBox initialisieren
|
|
||||||
SaveConfig = Speichere Konfiguration
|
|
||||||
Update = Aktualisieren
|
|
||||||
Mount = CryptoDaten aktivieren
|
|
||||||
Umount = CryptoDaten deaktivieren
|
|
||||||
PowerOff = ausschalten
|
|
||||||
ReBoot = neu starten
|
|
||||||
Protocol = Protokoll
|
|
||||||
Documentation = Handbuch
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
WarningMessage {
|
|
||||||
InitNotConfirmed {
|
|
||||||
Title = Bestätigung schlug fehl
|
|
||||||
Text = Der Bestätigungssatz muss exakt eingegeben werden!
|
|
||||||
}
|
|
||||||
|
|
||||||
EmptyPassword {
|
|
||||||
Title = Ungültige Eingabe
|
|
||||||
Text = Das Passwort darf nicht leer sein!
|
|
||||||
}
|
|
||||||
|
|
||||||
DifferentPasswords {
|
|
||||||
Title = Ungleiche Passworte
|
|
||||||
Text = Die beiden Passworte müssen identisch sein, um sicherzustellen, dass dies das gewünschte Passwort ist.
|
|
||||||
}
|
|
||||||
|
|
||||||
MountFailed {
|
|
||||||
Title = Aktivierung schlug fehl
|
|
||||||
Text = Das verschlüsselte Dateisystem konnte nicht aktiviert werden. Wahrscheinlich war das Passwort falsch.
|
|
||||||
}
|
|
||||||
|
|
||||||
UmountFailed {
|
|
||||||
Title = Deaktivierung schlug fehl
|
|
||||||
Text = Das verschlüsselte Dateisystem konnte nicht abgeschaltet werden. Wahrscheinlich sind noch Dateien geöffnet. Also schließen sie alle potentiell unsauberen Programme (beispielsweise die weitverbreitete Textverarbeitung). Notfalls einfach die CryptoBox herunterfahren!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NotConfigured {
|
|
||||||
Title = Keine Konfiguration gefunden
|
Text {
|
||||||
Text = Die CryptoBox wurde noch nicht eingerichtet.
|
EnterNewCryptoPassword = Das neue Crypto-Passwort eingeben:
|
||||||
|
EnterSameCryptoPassword = Das Crypto-Passwort wiederholen:
|
||||||
|
EnterNewAdminPassword = Das neue Admin-Passwort eingeben:
|
||||||
|
EnterSameAdminPassword = Das Admin-Passwort wiederholen:
|
||||||
|
InitWarning = Bei der Initialisierung werden ALLE DATEN auf der Festplatte GELÖSCHT!
|
||||||
|
InitDescription = Dieser Schritt ist nur einmalig vor der ersten Nutzung notwendig.<br>Für den täglichen Gebrauch muessen sie das verschlüsselte Dateisystem lediglich aktivieren und deaktivieren
|
||||||
|
ConfirmInitHint = Um zu bestätigen, dass sie wissen, was sie tun, tippen sie hier bitte exakt Folgendes ein:
|
||||||
|
ConfirmInit = ja, loesche alle Daten!
|
||||||
|
PartitionInfo = Derzeitige Partitionierung der Festplatte:
|
||||||
|
IPAddress = Netwerk-Adresse (IP) der CryptoBox:
|
||||||
|
TimeOut = Zeitabschaltung des Crypto-Dateisystems (in Minuten):
|
||||||
|
EmptyLog = Das Logbuch der CryptoBox ist leer.
|
||||||
|
SelectLanguage = Spracheinstellung:
|
||||||
|
RedirectNote = Klicken sie hier, falls ihr Browser die automatische Weiterleitung nicht unterstützt.
|
||||||
|
ProjectHomePage = Projekt-Seite
|
||||||
|
ProjectNote = Die CryptoBox ist ein Projekt von
|
||||||
|
DoUmount = Deaktivierung des verschlüsselten Dateisystems
|
||||||
|
DoMount = Aktivierung des verschlüsselten Dateisystems
|
||||||
}
|
}
|
||||||
|
|
||||||
InitNotFinished {
|
|
||||||
Title = Initalisierung noch nicht abgeschlossen
|
Button {
|
||||||
Text = Die Initialisierung wird in wenigen Minuten beendet sein. Erst danach ist diese Aktion möglich.
|
DoInit = CryptoBox initialisieren
|
||||||
|
SaveConfig = Speichere Konfiguration
|
||||||
|
Update = Aktualisieren
|
||||||
|
Mount = CryptoDaten aktivieren
|
||||||
|
Umount = CryptoDaten deaktivieren
|
||||||
|
PowerOff = ausschalten
|
||||||
|
ReBoot = neu starten
|
||||||
|
Protocol = Protokoll
|
||||||
|
Documentation = Handbuch
|
||||||
}
|
}
|
||||||
|
|
||||||
IsMounted {
|
|
||||||
Title = Bereits aktiv
|
WarningMessage {
|
||||||
Text = Das verschlüsselte Dateisystem ist bereits aktiv.
|
InitNotConfirmed {
|
||||||
|
Title = Bestätigung schlug fehl
|
||||||
|
Text = Der Bestätigungssatz muss exakt eingegeben werden!
|
||||||
|
}
|
||||||
|
|
||||||
|
EmptyCryptoPassword {
|
||||||
|
Title = Ungültiges Crypto-Passwort
|
||||||
|
Text = Das Crypto-Passwort darf nicht leer sein!
|
||||||
|
}
|
||||||
|
|
||||||
|
DifferentCryptoPasswords {
|
||||||
|
Title = Ungleiche Crypto-Passworte
|
||||||
|
Text = Die beiden Passworte müssen identisch sein, um sicherzustellen, dass dies das gewünschte Passwort ist.
|
||||||
|
}
|
||||||
|
|
||||||
|
DifferentAdminPasswords {
|
||||||
|
Title = Ungleiche Administratons-Passworte
|
||||||
|
Text = Die beiden Passworte müssen identisch sein, um sicherzustellen, dass dies das gewünschte Passwort ist.
|
||||||
|
}
|
||||||
|
|
||||||
|
MountFailed {
|
||||||
|
Title = Aktivierung schlug fehl
|
||||||
|
Text = Das verschlüsselte Dateisystem konnte nicht aktiviert werden. Wahrscheinlich war das Passwort falsch.
|
||||||
|
}
|
||||||
|
|
||||||
|
UmountFailed {
|
||||||
|
Title = Deaktivierung schlug fehl
|
||||||
|
Text = Das verschlüsselte Dateisystem konnte nicht abgeschaltet werden. Wahrscheinlich sind noch Dateien geöffnet. Also schließen sie alle potentiell unsauberen Programme (beispielsweise die weitverbreitete Textverarbeitung). Notfalls einfach die CryptoBox herunterfahren!
|
||||||
|
}
|
||||||
|
|
||||||
|
NotConfigured {
|
||||||
|
Title = Keine Konfiguration gefunden
|
||||||
|
Text = Die CryptoBox wurde noch nicht eingerichtet.
|
||||||
|
}
|
||||||
|
|
||||||
|
InitNotFinished {
|
||||||
|
Title = Initalisierung noch nicht abgeschlossen
|
||||||
|
Text = Die Initialisierung wird in wenigen Minuten beendet sein. Erst danach ist diese Aktion möglich.
|
||||||
|
}
|
||||||
|
|
||||||
|
IsMounted {
|
||||||
|
Title = Bereits aktiv
|
||||||
|
Text = Das verschlüsselte Dateisystem ist bereits aktiv.
|
||||||
|
}
|
||||||
|
|
||||||
|
NotMounted {
|
||||||
|
Title = Nicht aktiv
|
||||||
|
Text = Das verschlüsselte Dateisystem ist derzeit nicht aktiv.
|
||||||
|
}
|
||||||
|
|
||||||
|
AlreadyConfigured {
|
||||||
|
Title = Konfiguration gefunden
|
||||||
|
Text = Die CryptoBox wurde bereits eingerichtet. Bei einer erneuten Initialisierung werden alle Daten gelöscht!
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidLanguage {
|
||||||
|
Title = Ungültige Sprache
|
||||||
|
Text = Die ausgewählte Sprache ist nicht verfügbar!
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidIP {
|
||||||
|
Title = Ungültige IP
|
||||||
|
Text = Die ausgewählte Netzwerkadresse ist nicht gültig!
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidTimeOut {
|
||||||
|
Title = Ungültige Zeitabschaltung
|
||||||
|
Text = Der ausgewählte Wert der Zeitabschaltung ist nicht gültig!
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigTimeOutFailed {
|
||||||
|
Title = Fehler beim Ändern der Zeitabschaltung
|
||||||
|
Text = Der Wert der Zeitabschaltung konnte nicht geändert werden!
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigLanguageFailed {
|
||||||
|
Title = Fehler beim Ändern der Spracheinstellung
|
||||||
|
Text = Die Sprach-Einstellung konnte nicht geändert werden!
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigIPFailed {
|
||||||
|
Title = Fehler beim Ändern der Netzwerkadresse
|
||||||
|
Text = Die Netzwerkadresse konnte nicht geändert werden!
|
||||||
|
}
|
||||||
|
|
||||||
|
IPAddressChanged {
|
||||||
|
Title = Änderung der Netzwerk-Adresse
|
||||||
|
Text = Die Netzwerk-Adresse der CryptoBox wurde verändert. In wenigen Sekunden werden sie zu der neuen Adresse umgeleitet.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
NotMounted {
|
|
||||||
Title = Nicht aktiv
|
SuccessMessage {
|
||||||
Text = Das verschlüsselte Dateisystem ist derzeit nicht aktiv.
|
InitRunning {
|
||||||
|
Title = Initialisierung läuft
|
||||||
|
Text = Die Initialisierung der CryptoBox wird im Hintergrund abgeschlossen.
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigSaved {
|
||||||
|
Title = Konfiguration gespeichert
|
||||||
|
Text = Die neuen Einstellungen der CryptoBox wurden übernommem.
|
||||||
|
}
|
||||||
|
|
||||||
|
MountDone {
|
||||||
|
Title = Crypto-Daten aktiviert
|
||||||
|
Text = Das verschlüsselte Dateisystem ist nun verfügbar.
|
||||||
|
}
|
||||||
|
|
||||||
|
UmountDone {
|
||||||
|
Title = Crypto-Daten deaktiviert
|
||||||
|
Text = Das verschlüsselte Dateisystem ist nun vor jedem Zugriff geschützt.
|
||||||
|
}
|
||||||
|
|
||||||
|
PowerOff {
|
||||||
|
Title = Abschaltung
|
||||||
|
Text = Die CryptoBox wird gerade heruntergefahren. In wenigen Sekunden können sie sie ausschalten (falls dies nicht automatisch geschieht).
|
||||||
|
}
|
||||||
|
|
||||||
|
ReBoot {
|
||||||
|
Title = Neustart
|
||||||
|
Text = Die CryptoBox wird gerade neu gestartet. In wenigen Sekunden ist sie wieder verfügbar.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AlreadyConfigured {
|
|
||||||
Title = Konfiguration gefunden
|
ErrorMessage {
|
||||||
Text = Die CryptoBox wurde bereits eingerichtet. Bei einer erneuten Initialisierung werden alle Daten gelöscht!
|
|
||||||
|
UnknownAction {
|
||||||
|
Title = Unbekannte Aktion
|
||||||
|
Text = Sie haben eine undefinierte Aktion angefordert.
|
||||||
|
}
|
||||||
|
|
||||||
|
NoSSL {
|
||||||
|
Title = Unverschlüsselte Verbindung
|
||||||
|
Text = Die CryptoBox akzeptiert nur verschlüsselte Verbindungen (https). So bleibt das Passwort vor neugierigen Augen geschützt.
|
||||||
|
}
|
||||||
|
|
||||||
|
InitFailed {
|
||||||
|
Title = Initialisierung fehlgeschlagen
|
||||||
|
Text = Senden sie bitte den Inhalt des Protokolls (siehe oben) an die Entwickler der CryptoBox.
|
||||||
|
}
|
||||||
|
|
||||||
|
NoHardDisk {
|
||||||
|
Title = Keine Festplatte
|
||||||
|
Text = Es wurde kein Datenträger gefunden, der zur Speicherung der verschlüsselten Daten geeignet ist. Prüfen sie bitte, ob beim Anschalten des Computers eine Festplatte vom BIOS erkannt wurde.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidLanguage {
|
|
||||||
Title = Ungültige Sprache
|
|
||||||
Text = Die ausgewählte Sprache ist nicht verfügbar!
|
|
||||||
}
|
|
||||||
|
|
||||||
InvalidIP {
|
|
||||||
Title = Ungültige IP
|
|
||||||
Text = Die ausgewählte Netzwerkadresse ist nicht gültig!
|
|
||||||
}
|
|
||||||
|
|
||||||
InvalidTimeOut {
|
|
||||||
Title = Ungültige Zeitabschaltung
|
|
||||||
Text = Der ausgewählte Wert der Zeitabschaltung ist nicht gültig!
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfigTimeOutFailed {
|
|
||||||
Title = Fehler beim Ändern der Zeitabschaltung
|
|
||||||
Text = Der Wert der Zeitabschaltung konnte nicht geändert werden!
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfigLanguageFailed {
|
|
||||||
Title = Fehler beim Ändern der Spracheinstellung
|
|
||||||
Text = Die Sprach-Einstellung konnte nicht geändert werden!
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfigIPFailed {
|
|
||||||
Title = Fehler beim Ändern der Netzwerkadresse
|
|
||||||
Text = Die Netzwerkadresse konnte nicht geändert werden!
|
|
||||||
}
|
|
||||||
|
|
||||||
IPAddressChanged {
|
|
||||||
Title = Änderung der Netzwerk-Adresse
|
|
||||||
Text = Die Netzwerk-Adresse der CryptoBox wurde verändert. In wenigen Sekunden werden sie zu der neuen Adresse umgeleitet.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SuccessMessage {
|
|
||||||
InitRunning {
|
|
||||||
Title = Initialisierung läuft
|
|
||||||
Text = Die Initialisierung der CryptoBox wird im Hintergrund abgeschlossen.
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfigSaved {
|
|
||||||
Title = Konfiguration gespeichert
|
|
||||||
Text = Die neuen Einstellungen der CryptoBox wurden übernommem.
|
|
||||||
}
|
|
||||||
|
|
||||||
MountDone {
|
|
||||||
Title = Crypto-Daten aktiviert
|
|
||||||
Text = Das verschlüsselte Dateisystem ist nun verfügbar.
|
|
||||||
}
|
|
||||||
|
|
||||||
UmountDone {
|
|
||||||
Title = Crypto-Daten deaktiviert
|
|
||||||
Text = Das verschlüsselte Dateisystem ist nun vor jedem Zugriff geschützt.
|
|
||||||
}
|
|
||||||
|
|
||||||
PowerOff {
|
|
||||||
Title = Abschaltung
|
|
||||||
Text = Die CryptoBox wird gerade heruntergefahren. In wenigen Sekunden können sie sie ausschalten (falls dies nicht automatisch geschieht).
|
|
||||||
}
|
|
||||||
|
|
||||||
ReBoot {
|
|
||||||
Title = Neustart
|
|
||||||
Text = Die CryptoBox wird gerade neu gestartet. In wenigen Sekunden ist sie wieder verfügbar.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ErrorMessage {
|
|
||||||
|
|
||||||
UnknownAction {
|
|
||||||
Title = Unbekannte Aktion
|
|
||||||
Text = Sie haben eine undefinierte Aktion angefordert.
|
|
||||||
}
|
|
||||||
|
|
||||||
NoSSL {
|
|
||||||
Title = Unverschlüsselte Verbindung
|
|
||||||
Text = Die CryptoBox akzeptiert nur verschlüsselte Verbindungen (https). So bleibt das Passwort vor neugierigen Augen geschützt.
|
|
||||||
}
|
|
||||||
|
|
||||||
InitFailed {
|
|
||||||
Title = Initialisierung fehlgeschlagen
|
|
||||||
Text = Senden sie bitte den Inhalt des Protokolls (siehe oben) an die Entwickler der CryptoBox.
|
|
||||||
}
|
|
||||||
|
|
||||||
NoHardDisk {
|
|
||||||
Title = Keine Festplatte
|
|
||||||
Text = Es wurde kein Datenträger gefunden, der zur Speicherung der verschlüsselten Daten geeignet ist. Prüfen sie bitte, ob beim Anschalten des Computers eine Festplatte vom BIOS erkannt wurde.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,27 @@
|
||||||
<h1><?cs var:Lang.Title.Init ?></h1>
|
<h1><?cs var:Lang.Title.Init ?></h1>
|
||||||
|
|
||||||
<div class="init">
|
<div class="init">
|
||||||
<form action="<?cs call:getSelfURL('','') ?>" method="post" enctype="application/x-www-form-urlencoded">
|
<form action="<?cs call:getSelfURL('','') ?>" method="post" enctype="application/x-www-form-urlencoded">
|
||||||
|
|
||||||
<p class="note"><?cs var:Lang.Text.InitWarning ?></p>
|
<p class="note"><?cs var:Lang.Text.InitWarning ?></p>
|
||||||
<p><label for="password"><?cs call:help_popUp(Lang.Text.EnterNewPassword,"crypto_pw") ?></label><br/>
|
<p><label for="admin_password"><?cs call:help_popUp(Lang.Text.EnterNewAdminPassword,"admin_pw") ?></label><br/>
|
||||||
<input type="password" id="password" name="password" size="20" tabindex="1" maxlength="40" /></p>
|
<input type="password" id="admin_password" name="admin_password" size="20" tabindex="1" maxlength="40" /> </p>
|
||||||
<p><label for="password2"><?cs call:help_popUp(Lang.Text.EnterSamePassword,'crypto_pw_repeat') ?></label><br/>
|
<p><label for="admin_password2"><?cs call:help_popUp(Lang.Text.EnterSameAdminPassword,"admin_pw_repeat") ?></label><br/>
|
||||||
<input type="password" id="password2" name="password2" size="20" tabindex="2" maxlength="40" /></p>
|
<input type="password" id="admin_password2" name="admin_password2" size="20" tabindex="1" maxlength="40" /></p>
|
||||||
<p><label for="confirm"><?cs call:help_popUp(Lang.Text.ConfirmInitHint,'confirm_text') ?><br/>
|
<p><label for="crypto_password"><?cs call:help_popUp(Lang.Text.EnterNewCryptoPassword,"crypto_pw") ?></label><br/>
|
||||||
<span class="note" id="confirmtext"><?cs var:Lang.Text.ConfirmInit ?></span></label><br/>
|
<input type="password" id="crypto_password" name="crypto_password" size="20" tabindex="1" maxlength="40" /></p>
|
||||||
<input type="text" id="confirm" name="confirm" size="30" tabindex="3" maxlength="50" /></p>
|
<p><label for="crypto_password2"><?cs call:help_popUp(Lang.Text.EnterSameCryptoPassword,'crypto_pw_repeat') ?></label><br/>
|
||||||
<button type="submit" name="action" value="init_do" tabindex="4"><?cs var:Lang.Button.DoInit ?></button>
|
<input type="password" id="crypto_password2" name="crypto_password2" size="20" tabindex="2" maxlength="40" /></p>
|
||||||
|
<p><label for="confirm"><?cs call:help_popUp(Lang.Text.ConfirmInitHint,'confirm_text') ?><br/>
|
||||||
|
<span class="note" id="confirmtext"><?cs var:Lang.Text.ConfirmInit ?></span></label><br/>
|
||||||
|
<input type="text" id="confirm" name="confirm" size="30" tabindex="3" maxlength="50" /></p>
|
||||||
|
<button type="submit" name="action" value="init_do" tabindex="4"><?cs var:Lang.Button.DoInit ?></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<div class="partition_info">
|
<div class="partition_info">
|
||||||
<h2><?cs var:Lang.Text.PartitionInfo ?></h2>
|
<h2><?cs var:Lang.Text.PartitionInfo ?></h2>
|
||||||
<p><?cs var:Data.PartitionInfo ?></p>
|
<p><?cs var:Data.PartitionInfo ?></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<h3>Administration password of the CryptoBox</h3>
|
||||||
|
<p>This password protects your CryptoBox against random re-initialization by unauthorized people.
|
||||||
|
Any dangerous administrative action requires this administration password.</p>
|
||||||
|
<p>You may leave this password blank, if your network is safe.</p>
|
||||||
|
<p>The administration password does NOT protect your sensible data in any way!</p>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<h3>Repeat the administration password</h3>
|
||||||
|
<p>This ensures, that you do not mistype your administration password.</p>
|
||||||
|
<p>Leave it blank, if you do not need an administration password.</p>
|
|
@ -1,2 +1,2 @@
|
||||||
<h3>Repeat the crypto password</h3>
|
<h3>Repeat the encryption password</h3>
|
||||||
<p>This ensures, that you do not mistype your password.</p>
|
<p>This ensures, that you do not mistype your encryption password.</p>
|
||||||
|
|
|
@ -176,11 +176,13 @@ sub umount_vol
|
||||||
|
|
||||||
sub box_init
|
sub box_init
|
||||||
{
|
{
|
||||||
my $pw = shift;
|
my $admin_pw = shift;
|
||||||
|
my $crypto_pw = shift;
|
||||||
|
|
||||||
# partitioning, config and initial cryptsetup
|
# partitioning, config and initial cryptsetup
|
||||||
open(PW_INPUT, "|$CB_SCRIPT box-init-fg");
|
open(PW_INPUT, "|$CB_SCRIPT box-init-fg");
|
||||||
print PW_INPUT $pw;
|
print PW_INPUT "$admin_pw";
|
||||||
|
print PW_INPUT "$crypto_pw";
|
||||||
close(PW_INPUT);
|
close(PW_INPUT);
|
||||||
|
|
||||||
# wipe and mkfs takes some time - it will be done in the background
|
# wipe and mkfs takes some time - it will be done in the background
|
||||||
|
@ -286,207 +288,211 @@ if ($query->param('weblang') && &validate_doc_language($query->param('weblang'))
|
||||||
|
|
||||||
# first: check for ssl!
|
# first: check for ssl!
|
||||||
if ( ! &check_ssl()) {
|
if ( ! &check_ssl()) {
|
||||||
$pagedata->setValue('Data.Error', 'NoSSL');
|
$pagedata->setValue('Data.Error', 'NoSSL');
|
||||||
$pagedata->setValue('Data.Redirect.URL', "https://" . $ENV{'HTTP_HOST'} . $ENV{'SCRIPT_NAME'});
|
$pagedata->setValue('Data.Redirect.URL', "https://" . $ENV{'HTTP_HOST'} . $ENV{'SCRIPT_NAME'});
|
||||||
$pagedata->setValue('Data.Redirect.Delay', "3");
|
$pagedata->setValue('Data.Redirect.Delay', "3");
|
||||||
} elsif ( ! &is_harddisk_available()) {
|
} elsif ( ! &is_harddisk_available()) {
|
||||||
$pagedata->setValue('Data.Error', 'NoHardDisk');
|
$pagedata->setValue('Data.Error', 'NoHardDisk');
|
||||||
} elsif ($query->param('action')) {
|
} elsif ($query->param('action')) {
|
||||||
my $action = $query->param('action');
|
my $action = $query->param('action');
|
||||||
################ umount_do #######################
|
################ umount_do #######################
|
||||||
if ($action eq 'umount_do') {
|
if ($action eq 'umount_do') {
|
||||||
if ( ! &check_config()) {
|
if ( ! &check_config()) {
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} elsif (&check_init_running()) {
|
} elsif (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
} elsif ( ! &check_mounted()) {
|
} elsif ( ! &check_mounted()) {
|
||||||
$pagedata->setValue('Data.Warning', 'NotMounted');
|
$pagedata->setValue('Data.Warning', 'NotMounted');
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
} else {
|
|
||||||
# unmounten
|
|
||||||
&umount_vol();
|
|
||||||
if (&check_mounted()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'UmountFailed');
|
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Success', 'UmountDone');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
################ mount_do ########################
|
|
||||||
} elsif ($action eq 'mount_do') {
|
|
||||||
# mount requested
|
|
||||||
if ( ! &check_config()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} elsif (&check_init_running()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
} elsif (&check_mounted()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'IsMounted');
|
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
|
||||||
} elsif ($query->param('password') eq '') {
|
|
||||||
# leeres Passwort
|
|
||||||
$pagedata->setValue('Data.Warning', 'EmptyPassword');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
} else {
|
|
||||||
# mounten
|
|
||||||
&mount_vol($query->param('password'));
|
|
||||||
if (!&check_mounted()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'MountFailed');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Success', 'MountDone');
|
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
################## mount_ask #######################
|
|
||||||
} elsif ($action eq 'mount_ask') {
|
|
||||||
if ( ! &check_config()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} elsif (&check_init_running()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
} elsif (&check_mounted()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'IsMounted');
|
|
||||||
$pagedata->setValue('Data.Action', 'intro');
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
}
|
|
||||||
################# umount_ask ########################
|
|
||||||
} elsif ($action eq 'umount_ask') {
|
|
||||||
if ( ! &check_config()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} elsif ( ! &check_mounted()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'NotMounted');
|
|
||||||
$pagedata->setValue('Data.Action', 'mount_form');
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Action', 'umount_form');
|
|
||||||
}
|
|
||||||
################## init_ask #########################
|
|
||||||
} elsif ($action eq 'init_ask') {
|
|
||||||
if (&check_init_running()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
|
||||||
$pagedata->setValue('Data.Action', 'intro');
|
|
||||||
} elsif (&check_config()) {
|
|
||||||
$pagedata->setValue('Data.Warning', 'AlreadyConfigured');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
}
|
|
||||||
#################### init_do ########################
|
|
||||||
} elsif ($action eq 'init_do') {
|
|
||||||
if ($query->param('password') ne $query->param('password2')) {
|
|
||||||
# different passwords
|
|
||||||
$pagedata->setValue('Data.Warning', 'DifferentPasswords');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} elsif ($query->param('password') eq '') {
|
|
||||||
# empty password
|
|
||||||
$pagedata->setValue('Data.Warning', 'EmptyPassword');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} elsif ($query->param('confirm') ne $pagedata->getValue('Lang.Text.ConfirmInit','')) {
|
|
||||||
# wrong confirm string
|
|
||||||
$pagedata->setValue('Data.Warning', 'InitNotConfirmed');
|
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
|
||||||
} else {
|
|
||||||
# do init
|
|
||||||
&box_init($query->param('password'));
|
|
||||||
if (!&check_init_running()) {
|
|
||||||
$pagedata->setValue('Data.Error', 'InitFailed');
|
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Success', 'InitRunning');
|
# unmounten
|
||||||
$pagedata->setValue('Data.Action', 'config_form');
|
&umount_vol();
|
||||||
|
if (&check_mounted()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'UmountFailed');
|
||||||
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Success', 'UmountDone');
|
||||||
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
################ mount_do ########################
|
||||||
#################### config_ask ######################
|
} elsif ($action eq 'mount_do') {
|
||||||
} elsif ($action eq 'config_ask') {
|
# mount requested
|
||||||
if ( ! &check_config()) {
|
if ( ! &check_config()) {
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
} else {
|
} elsif (&check_init_running()) {
|
||||||
$pagedata->setValue('Data.Action', 'config_form');
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
}
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
#################### config_do #######################
|
} elsif (&check_mounted()) {
|
||||||
} elsif ($action eq 'config_do') {
|
$pagedata->setValue('Data.Warning', 'IsMounted');
|
||||||
if ( ! &check_config()) {
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
} elsif ($query->param('password') eq '') {
|
||||||
$pagedata->setValue('Data.Action', 'init_form');
|
# leeres Passwort
|
||||||
} else {
|
$pagedata->setValue('Data.Warning', 'EmptyPassword');
|
||||||
if ( ! &validate_language($query->param('language'))) {
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
$pagedata->setValue('Data.Warning', 'InvalidLanguage');
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'config_form');
|
# mounten
|
||||||
} elsif ( ! &validate_ip($query->param('ip'))) {
|
&mount_vol($query->param('password'));
|
||||||
$pagedata->setValue('Data.Warning', 'InvalidIP');
|
if (!&check_mounted()) {
|
||||||
$pagedata->setValue('Data.Action', 'config_form');
|
$pagedata->setValue('Data.Warning', 'MountFailed');
|
||||||
} elsif ( ! &validate_timeout($query->param('timeout'))) {
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
$pagedata->setValue('Data.Warning', 'InvalidTimeOut');
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'config_form');
|
$pagedata->setValue('Data.Success', 'MountDone');
|
||||||
} else {
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
system("$CB_SCRIPT", "set_config", "language", $query->param('language'));
|
}
|
||||||
system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout'));
|
|
||||||
# check, if the ip was reconfigured
|
|
||||||
if ($query->param('ip') ne `$CB_SCRIPT get_config ip`)
|
|
||||||
{
|
|
||||||
# set the new value
|
|
||||||
system("$CB_SCRIPT", "set_config", "ip", $query->param('ip'));
|
|
||||||
# reconfigure the network interface
|
|
||||||
system("$CB_SCRIPT", "update_ip_address");
|
|
||||||
# redirect to the new address
|
|
||||||
$pagedata->setValue('Data.Redirect.URL', "https://" . $query->param('ip') . $ENV{'SCRIPT_NAME'});
|
|
||||||
$pagedata->setValue('Data.Redirect.Delay', "5");
|
|
||||||
# display a warning for the redirection
|
|
||||||
$pagedata->setValue('Data.Warning', 'IPAddressChanged');
|
|
||||||
}
|
}
|
||||||
|
################## mount_ask #######################
|
||||||
|
} elsif ($action eq 'mount_ask') {
|
||||||
|
if ( ! &check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif (&check_init_running()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
|
} elsif (&check_mounted()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'IsMounted');
|
||||||
|
$pagedata->setValue('Data.Action', 'intro');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
|
}
|
||||||
|
################# umount_ask ########################
|
||||||
|
} elsif ($action eq 'umount_ask') {
|
||||||
|
if ( ! &check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif ( ! &check_mounted()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotMounted');
|
||||||
|
$pagedata->setValue('Data.Action', 'mount_form');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Action', 'umount_form');
|
||||||
|
}
|
||||||
|
################## init_ask #########################
|
||||||
|
} elsif ($action eq 'init_ask') {
|
||||||
|
if (&check_init_running()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InitNotFinished');
|
||||||
|
$pagedata->setValue('Data.Action', 'intro');
|
||||||
|
} elsif (&check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'AlreadyConfigured');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
}
|
||||||
|
#################### init_do ########################
|
||||||
|
} elsif ($action eq 'init_do') {
|
||||||
|
if ($query->param('admin_password') ne $query->param('admin_password2')) {
|
||||||
|
# different admin-passwords
|
||||||
|
$pagedata->setValue('Data.Warning', 'DifferentAdminPasswords');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif ($query->param('crypto_password') ne $query->param('crypto_password2')) {
|
||||||
|
# different crypto-passwords
|
||||||
|
$pagedata->setValue('Data.Warning', 'DifferentCryptoPasswords');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif ($query->param('crypto_password') eq '') {
|
||||||
|
# empty password
|
||||||
|
$pagedata->setValue('Data.Warning', 'EmptyCryptoPassword');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} elsif ($query->param('confirm') ne $pagedata->getValue('Lang.Text.ConfirmInit','')) {
|
||||||
|
# wrong confirm string
|
||||||
|
$pagedata->setValue('Data.Warning', 'InitNotConfirmed');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} else {
|
||||||
|
# do init
|
||||||
|
&box_init($query->param('admin_password'),$query->param('crypto_password'));
|
||||||
|
if (!&check_init_running()) {
|
||||||
|
$pagedata->setValue('Data.Error', 'InitFailed');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Success', 'InitRunning');
|
||||||
|
$pagedata->setValue('Data.Action', 'config_form');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#################### config_ask ######################
|
||||||
|
} elsif ($action eq 'config_ask') {
|
||||||
|
if ( ! &check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Action', 'config_form');
|
||||||
|
}
|
||||||
|
#################### config_do #######################
|
||||||
|
} elsif ($action eq 'config_do') {
|
||||||
|
if ( ! &check_config()) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'NotConfigured');
|
||||||
|
$pagedata->setValue('Data.Action', 'init_form');
|
||||||
|
} else {
|
||||||
|
if ( ! &validate_language($query->param('language'))) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InvalidLanguage');
|
||||||
|
$pagedata->setValue('Data.Action', 'config_form');
|
||||||
|
} elsif ( ! &validate_ip($query->param('ip'))) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InvalidIP');
|
||||||
|
$pagedata->setValue('Data.Action', 'config_form');
|
||||||
|
} elsif ( ! &validate_timeout($query->param('timeout'))) {
|
||||||
|
$pagedata->setValue('Data.Warning', 'InvalidTimeOut');
|
||||||
|
$pagedata->setValue('Data.Action', 'config_form');
|
||||||
|
} else {
|
||||||
|
system("$CB_SCRIPT", "set_config", "language", $query->param('language'));
|
||||||
|
system("$CB_SCRIPT", "set_config", "timeout", $query->param('timeout'));
|
||||||
|
# check, if the ip was reconfigured
|
||||||
|
if ($query->param('ip') ne `$CB_SCRIPT get_config ip`)
|
||||||
|
{
|
||||||
|
# set the new value
|
||||||
|
system("$CB_SCRIPT", "set_config", "ip", $query->param('ip'));
|
||||||
|
# reconfigure the network interface
|
||||||
|
system("$CB_SCRIPT", "update_ip_address");
|
||||||
|
# redirect to the new address
|
||||||
|
$pagedata->setValue('Data.Redirect.URL', "https://" . $query->param('ip') . $ENV{'SCRIPT_NAME'});
|
||||||
|
$pagedata->setValue('Data.Redirect.Delay', "5");
|
||||||
|
# display a warning for the redirection
|
||||||
|
$pagedata->setValue('Data.Warning', 'IPAddressChanged');
|
||||||
|
}
|
||||||
|
|
||||||
# check for success
|
# check for success
|
||||||
if (`$CB_SCRIPT get_config timeout` ne $query->param('timeout')) {
|
if (`$CB_SCRIPT get_config timeout` ne $query->param('timeout')) {
|
||||||
$pagedata->setValue('Data.Warning', 'ConfigTimeOutFailed');
|
$pagedata->setValue('Data.Warning', 'ConfigTimeOutFailed');
|
||||||
} elsif (`$CB_SCRIPT get_config ip` ne $query->param('ip')) {
|
} elsif (`$CB_SCRIPT get_config ip` ne $query->param('ip')) {
|
||||||
$pagedata->setValue('Data.Warning', 'ConfigIPFailed');
|
$pagedata->setValue('Data.Warning', 'ConfigIPFailed');
|
||||||
} elsif (`$CB_SCRIPT get_config language` ne $query->param('language')) {
|
} elsif (`$CB_SCRIPT get_config language` ne $query->param('language')) {
|
||||||
$pagedata->setValue('Data.Warning', 'ConfigLanguageFailed');
|
$pagedata->setValue('Data.Warning', 'ConfigLanguageFailed');
|
||||||
|
} else {
|
||||||
|
$pagedata->setValue('Data.Success', 'ConfigSaved');
|
||||||
|
}
|
||||||
|
$pagedata->setValue('Data.Action', 'intro');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#################### show_log #######################
|
||||||
|
} elsif ($action eq 'show_log') {
|
||||||
|
$pagedata->setValue('Data.Action', 'show_log');
|
||||||
|
##################### doc ############################
|
||||||
|
} elsif ($action eq 'doc') {
|
||||||
|
if ($query->param('page')) {
|
||||||
|
$pagedata->setValue('Data.Doc.Page', $query->param('page'));
|
||||||
|
$pagedata->setValue('Data.Action', 'doc');
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Success', 'ConfigSaved');
|
$pagedata->setValue('Data.Doc.Page', 'CryptoBox');
|
||||||
|
$pagedata->setValue('Data.Action', 'doc');
|
||||||
|
}
|
||||||
|
##################### poweroff ######################
|
||||||
|
} elsif ($action eq 'shutdown_ask') {
|
||||||
|
$pagedata->setValue('Data.Action', 'shutdown_form');
|
||||||
|
##################### reboot ########################
|
||||||
|
} elsif ($action eq 'shutdown_do') {
|
||||||
|
if ($query->param('type') eq 'reboot') {
|
||||||
|
&system_reboot();
|
||||||
|
$pagedata->setValue('Data.Success', 'ReBoot');
|
||||||
|
} else {
|
||||||
|
&system_poweroff();
|
||||||
|
$pagedata->setValue('Data.Success', 'PowerOff');
|
||||||
}
|
}
|
||||||
$pagedata->setValue('Data.Action', 'intro');
|
$pagedata->setValue('Data.Action', 'intro');
|
||||||
}
|
################### unknown #########################
|
||||||
}
|
|
||||||
#################### show_log #######################
|
|
||||||
} elsif ($action eq 'show_log') {
|
|
||||||
$pagedata->setValue('Data.Action', 'show_log');
|
|
||||||
##################### doc ############################
|
|
||||||
} elsif ($action eq 'doc') {
|
|
||||||
if ($query->param('page')) {
|
|
||||||
$pagedata->setValue('Data.Doc.Page', $query->param('page'));
|
|
||||||
$pagedata->setValue('Data.Action', 'doc');
|
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Doc.Page', 'CryptoBox');
|
$pagedata->setValue('Data.Error', 'UnknownAction');
|
||||||
$pagedata->setValue('Data.Action', 'doc');
|
|
||||||
}
|
}
|
||||||
##################### poweroff ######################
|
|
||||||
} elsif ($action eq 'shutdown_ask') {
|
|
||||||
$pagedata->setValue('Data.Action', 'shutdown_form');
|
|
||||||
##################### reboot ########################
|
|
||||||
} elsif ($action eq 'shutdown_do') {
|
|
||||||
if ($query->param('type') eq 'reboot') {
|
|
||||||
&system_reboot();
|
|
||||||
$pagedata->setValue('Data.Success', 'ReBoot');
|
|
||||||
} else {
|
|
||||||
&system_poweroff();
|
|
||||||
$pagedata->setValue('Data.Success', 'PowerOff');
|
|
||||||
}
|
|
||||||
$pagedata->setValue('Data.Action', 'intro');
|
|
||||||
################### unknown #########################
|
|
||||||
} else {
|
|
||||||
$pagedata->setValue('Data.Error', 'UnknownAction');
|
|
||||||
}
|
|
||||||
###################### default ##########################
|
###################### default ##########################
|
||||||
} else {
|
} else {
|
||||||
$pagedata->setValue('Data.Action', 'intro');
|
$pagedata->setValue('Data.Action', 'intro');
|
||||||
}
|
}
|
||||||
|
|
||||||
# check state of the cryptobox
|
# check state of the cryptobox
|
||||||
|
|
|
@ -14,7 +14,7 @@ name = CryptoBox
|
||||||
version = 0.0.1
|
version = 0.0.1
|
||||||
|
|
||||||
# Person that built it
|
# Person that built it
|
||||||
builder = s.l.
|
builder = sense.lab
|
||||||
|
|
||||||
# Repositories to mirror. Details about each one are configured below.
|
# Repositories to mirror. Details about each one are configured below.
|
||||||
dlrepos = sarge
|
dlrepos = sarge
|
||||||
|
@ -28,8 +28,8 @@ compress = no
|
||||||
# Files to never compress if the above is yes
|
# Files to never compress if the above is yes
|
||||||
# If a dir is given, that dir and everything below is not compressed
|
# If a dir is given, that dir and everything below is not compressed
|
||||||
dontcompress = /boot
|
dontcompress = /boot
|
||||||
/etc/*boot*
|
/etc/*boot*
|
||||||
/opt/dfsruntime/initrd.dfs
|
/opt/dfsruntime/initrd.dfs
|
||||||
|
|
||||||
# Location of dfsbuild support files
|
# Location of dfsbuild support files
|
||||||
libdir = /usr/lib/dfsbuild
|
libdir = /usr/lib/dfsbuild
|
||||||
|
@ -127,24 +127,24 @@ devices = scd0 scd1 scd2 scd3 scd4 hda hdb hdc hdd hde hdf hdg
|
||||||
|
|
||||||
# Files to place on the ramdisk
|
# Files to place on the ramdisk
|
||||||
ramdisk_files = /etc/resolv.conf
|
ramdisk_files = /etc/resolv.conf
|
||||||
/etc/lvm*
|
/etc/lvm*
|
||||||
/tmp
|
/tmp
|
||||||
/var/tmp
|
/var/tmp
|
||||||
/dev
|
/dev
|
||||||
/etc/fstab
|
/etc/fstab
|
||||||
/var/lib/dhcp
|
/var/lib/dhcp
|
||||||
/var/lib/samba
|
/var/lib/samba
|
||||||
/var/log
|
/var/log
|
||||||
/var/cache/samba
|
/var/cache/samba
|
||||||
/var/lock
|
/var/lock
|
||||||
/var/run
|
/var/run
|
||||||
/var/state
|
/var/state
|
||||||
/etc/mtab
|
/etc/mtab
|
||||||
/root
|
/root
|
||||||
/etc/network
|
/etc/network
|
||||||
/var/lib/misc
|
/var/lib/misc
|
||||||
/var/lib/urandom
|
/var/lib/urandom
|
||||||
/etc/hotplug
|
/etc/hotplug/.run
|
||||||
/var/spool/cron
|
/var/spool/cron
|
||||||
|
|
||||||
# Directories to create on live fs
|
# Directories to create on live fs
|
||||||
|
@ -152,8 +152,8 @@ makedirs = /root/.elinks
|
||||||
|
|
||||||
# Files to delete from live fs
|
# Files to delete from live fs
|
||||||
deletefiles = /etc/rcS.d/*discover
|
deletefiles = /etc/rcS.d/*discover
|
||||||
/etc/rcS.d/*hotplug
|
/etc/rcS.d/*hotplug
|
||||||
/etc/rcS.d/*lvm
|
/etc/rcS.d/*lvm
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Arch settings: i386
|
# Arch settings: i386
|
||||||
|
@ -211,7 +211,7 @@ arch = amd64
|
||||||
/etc/fstab = /dev/mapper/staub /mnt/crypto auto noauto,defaults 0 0
|
/etc/fstab = /dev/mapper/staub /mnt/crypto auto noauto,defaults 0 0
|
||||||
|
|
||||||
/etc/network/interfaces = auto lo
|
/etc/network/interfaces = auto lo
|
||||||
iface lo inet loopback
|
iface lo inet loopback
|
||||||
|
|
||||||
# /etc/modules =
|
# /etc/modules =
|
||||||
|
|
||||||
|
@ -226,8 +226,8 @@ arch = amd64
|
||||||
[createfiles]
|
[createfiles]
|
||||||
/etc/hostname = CryptoBox
|
/etc/hostname = CryptoBox
|
||||||
|
|
||||||
/etc/syslog.conf = *.* /dev/tty8
|
/etc/syslog.conf = *.* /dev/tty8
|
||||||
*.info /dev/tty7
|
*.info /dev/tty7
|
||||||
|
|
||||||
/etc/hosts = 127.0.0.1 localhost
|
/etc/hosts = 127.0.0.1 localhost
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue