mirror of
https://github.com/unraid/webgui.git
synced 2026-01-14 13:39:58 -06:00
Anytime /boot/syslinux/syslinux.cfg modifed, copy file to /boot/EFI/boot/syslinux.cfg
This commit is contained in:
@@ -388,6 +388,7 @@ switch ($action) {
|
||||
if ($boolModded) {
|
||||
// Write Changes to syslinux.cfg
|
||||
file_put_contents('/boot/syslinux/syslinux.cfg', implode('', $arrSyslinuxCfg));
|
||||
@copy('/boot/syslinux/syslinux.cfg', '/boot/EFI/boot/syslinux.cfg');
|
||||
}
|
||||
|
||||
$arrResponse = ['success' => true, 'modified' => $boolModded];
|
||||
@@ -411,6 +412,7 @@ switch ($action) {
|
||||
if ($boolModded) {
|
||||
// Write Changes to syslinux.cfg
|
||||
file_put_contents('/boot/syslinux/syslinux.cfg', implode('', $arrSyslinuxCfg));
|
||||
@copy('/boot/syslinux/syslinux.cfg', '/boot/EFI/boot/syslinux.cfg');
|
||||
}
|
||||
|
||||
$arrResponse = ['success' => true, 'modified' => $boolModded];
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
*/
|
||||
?>
|
||||
<?
|
||||
// write syslinux file
|
||||
write_log("Saving file $file");
|
||||
exec("mkdir -p ".escapeshellarg(dirname($file)));
|
||||
file_put_contents($file, str_replace(["\r\n","\r"], "\n", $_POST['text']));
|
||||
// syslinux.cfg hack
|
||||
if ($file == "/boot/syslinux/syslinux.cfg")
|
||||
@copy("/boot/syslinux/syslinux.cfg", "/boot/EFI/boot/syslinux.cfg");
|
||||
// discard settings
|
||||
$save = false;
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user