mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 10:08:25 -05:00
Merge branch '6.4-wip' of github.com:limetech/webgui into 6.4-wip
This commit is contained in:
@@ -23,17 +23,28 @@ $default_text = @file_get_contents("$file-");
|
||||
if ($default_text === false) $default_text = $text;
|
||||
?>
|
||||
<script>
|
||||
function setArg(boot) {
|
||||
$('input[name="#arg[1]"]').val(boot?1:0);
|
||||
}
|
||||
function setDefault(form) {
|
||||
form.elements['text'].value = <?=json_encode($default_text);?>;
|
||||
}
|
||||
</script>
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
|
||||
<form markdown="1" method="POST" action="/update.php" target="progressFrame" onsubmit="setArg(this.boot.checked)">
|
||||
<input type="hidden" name="#include" value="/webGui/include/update.file.php">
|
||||
<input type="hidden" name="#file" value="<?=$file;?>">
|
||||
<input type="hidden" name="#command" value="/webGui/scripts/bootmode">
|
||||
<input type="hidden" name="#arg[1]" value="">
|
||||
Syslinux configuration:
|
||||
|
||||
: <textarea spellcheck="false" cols="80" rows="22" maxlength="2048" name="text" style="font-family:bitstream;width:66%"><?=$text;?></textarea>
|
||||
|
||||
Server boot mode:
|
||||
: <?=is_dir('/sys/firmware/efi') ? 'UEFI' : 'Legacy'?>
|
||||
|
||||
Permit UEFI boot mode <input type="checkbox" name="boot" <?=is_dir('/boot/EFI') ? 'checked' : ''?>>
|
||||
: *Boot system in UEFI mode. Please check your system settings to support UEFI boot mode.*
|
||||
|
||||
<input type="button" value="Default" onclick="setDefault(this.form)">
|
||||
: <input type="submit" value="Apply"/><input type="button" value="Done" onclick="done()">
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
# usage: bootmode 0|1
|
||||
# 0 = legacy mode
|
||||
# 1 = UEFI mode
|
||||
|
||||
cd /boot
|
||||
case $1 in
|
||||
0) OLD=EFI; NEW=EFI-; ;;
|
||||
1) OLD=EFI-; NEW=EFI; ;;
|
||||
*) OLD=EFI; NEW=EFI-; ;;
|
||||
esac
|
||||
if [[ -d $OLD && ! -d $NEW ]]; then
|
||||
mv $OLD $NEW
|
||||
fi
|
||||
Reference in New Issue
Block a user