mirror of
https://github.com/unraid/webgui.git
synced 2026-04-23 18:48:49 -05:00
Add 'Restricted Start' config setting.
This commit is contained in:
@@ -18,9 +18,6 @@ Tag="key"
|
||||
<?
|
||||
$keyfile = file_exists($var['luksKeyfile']) ? $var['luksKeyfile'] : '';
|
||||
$online = $var['fsState']=='Stopped' ? '' : 'disabled';
|
||||
$ini = '/var/local/emhttp/keyfile.ini';
|
||||
$luks = false; foreach ($disks as $disk) $luks |= substr($disk['fsType'],0,5)=='luks:';
|
||||
$flag = $luks ? (file_exists($ini) ? file_get_contents($ini) : false) : false;
|
||||
?>
|
||||
<script>
|
||||
<?if ($keyfile):?>
|
||||
@@ -63,6 +60,24 @@ function getFileContent(event,form) {
|
||||
}
|
||||
<?endif;?>
|
||||
</script>
|
||||
<form markdown="1" name="encrypt_start" method="POST" action="/update.htm" target="progressFrame">
|
||||
Restricted Start:
|
||||
: <select name="luksStartMode" size="1" <?=$online?>>
|
||||
<?=mk_option($var['luksStartMode'], "0", "Yes")?>
|
||||
<?=mk_option($var['luksStartMode'], "1", "No")?>
|
||||
</select>
|
||||
|
||||
> When set to **Yes** the array cannot Start if the encryption passphrase/keyfile is missing or wrong. This
|
||||
> is the normal setting.
|
||||
|
||||
> When set to **No** the array may be Started and:
|
||||
|
||||
> * If the passphrase/keyfile is **missing**, then encrypted volumes will not be mounted and cannot be formatted.
|
||||
> * If the passphrase/keyfile is **wrong**, then encrypted volumes will appear Unmountable and may be formatted.
|
||||
|
||||
|
||||
: <input type="submit" name="changeDisk" value="Apply"><input type="button" value="Done" onclick="done()">
|
||||
</form>
|
||||
<form markdown="1" name="encrypt_settings" method="POST" action="/update.php" target="progressFrame" onsubmit="return checkInput(this)">
|
||||
<input type="hidden" name="#file" value="unused">
|
||||
<input type="hidden" name="#include" value="webGui/include/KeyUpload.php">
|
||||
@@ -86,25 +101,6 @@ Encryption key:
|
||||
Delete <input type="checkbox" name="keyfile" onchange="toggleButton(this.checked)">
|
||||
: <input type="submit" name="#apply" value="Delete" disabled><input type="button" value="Done" class="lock" onclick="done()">
|
||||
|
||||
<?else:?>
|
||||
<?if ($flag=='file'):?>
|
||||
<span class="orange-text big">To unlock encrypted devices, select the keyfile which was originally set</span>
|
||||
:
|
||||
|
||||
Keyfile:
|
||||
: <input type="file" name="local" onchange="getFileContent(event,this.form)"<?=$online?>>
|
||||
|
||||
|
||||
: <input type="submit" name="apply" value="Apply" class="lock"><input type="button" value="Done" onclick="done()"><?if ($online):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
<?elseif ($flag=='text'):?>
|
||||
<span class="orange-text big">To unlock encrypted devices, enter the passphrase which was originally set</span>
|
||||
:
|
||||
|
||||
Passphrase:
|
||||
: <input type="password" name="text" maxlength="512" value=""<?=$online?> onKeyUp="this.form.apply.disabled=(this.form.text.value.length==0)"><?if (!$online):?><input id="eye" type="checkbox" onchange="showPass(this.checked)">show passphrase<?endif;?>
|
||||
|
||||
|
||||
: <input type="submit" name="apply" value="Apply" class="lock"><input type="button" value="Done" onclick="done()"><?if ($online):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
<?else:?>
|
||||
Encryption key:
|
||||
: Not present
|
||||
@@ -149,5 +145,4 @@ Keyfile:
|
||||
<input type="button" value="Benchmark" onclick="openBox('/webGui/include/CryptoBenchmark.php','Encryption Benchmarking',600,640)">
|
||||
: <input type="submit" name="apply" value="Apply" class="lock"><input type="button" value="Done" onclick="done()"><?if ($online):?>Array must be <span class="strong big">Stopped</span> to change<?endif;?>
|
||||
<?endif;?>
|
||||
<?endif;?>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user