Closed LuanTeles closed 8 months ago
I didn't find any bug and my test worked. I dedicated more than one hour just to review the code and create a debug version.
I recommend you that add a beep command to the script while debugging to get a feedback when the script is executed.
Maybe the script is not being executed at all.
The issue seems to happen only to wm_config.bin, in my initial boot_init.txt most of the values are changed just fine, sometimes only the one i use to disable the startup notification doesn't work. (Deleting the .bin fixes it)
But the one that i use for uninstallation every command works except the ones to restore some webman settings and i don't know why
This boot_init i made to make sure the settings will be applied again and again they aren't, the script is running as the refresh list is being executed and the deletion of the .txt too.
I thought maybe webman was still reading the .bin that's why I added a 2 seconds delay but same thing..
This is a issue I'm facing for some time, in my installation boot_init I disable the webMAN settings on the xmb and when the user uninstall my mod I want it to restore it, but I can't make it work
The settings are read in memory before the script start. The plugin may update the config file with the data in memory.
If you make changes to the settings file externally you need to restart the plugin or the console to read the new settings.
If the issue is only with that file, you could make a copy, make the changes then replace the file.
Or you could have pre-configured files and replace the settings file. The problem with this method is that the custom settings like remote IP are lost.
The settings are read in memory before the script start. The plugin may update the config file with the data in memory.
If you make changes to the settings file externally you need to restart the plugin or the console to read the new settings.
If the issue is only with that file, you could make a copy, make the changes then replace the file.
Or you could have pre-configured files and replace the settings file. The problem with this method is that the custom settings like remote IP are lost.
Yeap, i'm avoiding a pre-configured file just because of remote ip, idps, pid and etc....
I'll try to figure out what can be happening as the settings in my initial boot_init most of the time are changed withou any problems
This is part of my initial boot_init: (Most of the time all works except /write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x40 #Disable Startup Notification)
but this part when a user change firmware without using my installer:
if exist /dev_flash/vsh/resource/explore/xmb/pro.xml
/remap.ps3/dev_hdd0/xmlhost/game_plugin/games.xml&to=dev_hdd0/xmlhost/game_plugin/mygames.xml
/remap.ps3/dev_hdd0/xmlhost/game_plugin/retro.xml&to=dev_hdd0/xmlhost/game_plugin/ROMS.xml
/remap.ps3/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/remaps/Features_Switch_Webman_Plugin.xml&to=/dev_hdd0/game/PS34KPROX/USRDIR/toolbox/xmls/Features_Switch_Webman_Plugin.xml
goto xmb_check
else
/popup.ps3$Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro;/beep.ps3?1;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x253;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x27;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x25;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x28;/delete.ps3/dev_hdd0/boot_plugins.txt;/delete.ps3/dev_hdd0/hen/themes;/delete.ps3/dev_hdd0/tmp/wm_icons/icon_wm_root.png;/refresh.ps3;/delete.ps3/dev_hdd0/tmp/canyon;/delete.ps3/dev_hdd0/tmp/canyon.off;/delete.ps3/dev_hdd0/tmp/coldboot;/delete.ps3/dev_hdd0/tmp/coldboot.off;/delete.ps3/dev_hdd0/tmp/earth;/delete.ps3/dev_hdd0/tmp/earth.off;/delete.ps3/dev_hdd0/tmp/gameboot;/delete.ps3/dev_hdd0/tmp/gameboot.off;/delete.ps3/dev_hdd0/tmp/gameboot_logo;/delete.ps3/dev_hdd0/tmp/gameboot_logo.off;/delete.ps3/dev_hdd0/tmp/impose;/delete.ps3/dev_hdd0/tmp/impose.off;/delete.ps3/dev_hdd0/tmp/lines;/delete.ps3/dev_hdd0/tmp/lines.off;/delete.ps3/dev_hdd0/tmp/psn_icons;/delete.ps3/dev_hdd0/tmp/psn_icons.off;/delete.ps3/dev_hdd0/tmp/theme;/delete.ps3/dev_hdd0/tmp/theme.off;/delete.ps3/dev_hdd0/tmp/wallpaper;/delete.ps3/dev_hdd0/tmp/wallpaper.off;/delete.ps3/dev_hdd0/tmp/system_music;/move.ps3/dev_hdd0/xmlhost.off&to=/dev_hdd0/xmlhost;/move.ps3/dev_hdd0/boot_plugins_firmware_change.txt&to=/dev_hdd0/boot_plugins.txt;/delete.ps3/dev_hdd0/theme/CD_*.p3t;/delete.ps3/dev_hdd0/autoexec.bat;/delete.ps3/dev_hdd0/boot_init_swap.txt;/delete.ps3/dev_hdd0/onxmb.bat;/delete.ps3/dev_hdd0/patches.bat;/delete.ps3/dev_hdd0/ingame.bat;/delete.ps3/dev_hdd0/home/$USERID$/webbrowser/setting.xml;/delete.ps3/dev_hdd0/PROISO;/delete.ps3/dev_blind/vsh/resource/theme/01.p3t;/xmb.ps3$xregistry(/setting/user/$USERID$/browser/exitConfirmation)=0;/xmb.ps3$xregistry(/setting/net/dnsFlag)=1;/netstatus.ps3?dns1=1.1.1.1;/netstatus.ps3?dns2=1.0.0.1;/delete.ps3/dev_hdd0/game/PS3ONLINE/USRDIR/settings/installedplugins;/move.ps3/dev_hdd0/boot_init_firmware_change.txt|/dev_hdd0/boot_init.txt;/reboot.ps3
end if
The settings do not change (At least the one i want, but all commands are executed
That's why I set it to restart and try to apply another boot_init if the first one didn't apply the settings.
Thanks aldo, i'll try to see what can be happening because that's wierd
@aldostools I found the problem!
It looks like webman is running the commands at the same time as refresh.ps3 (?) so webman server gets busy and can't write to the .bin
I tested my commands in my pc browser and it says WEBMAN SERVER IS BUSY, while the scanning process is running, so I removed the refresh command and the values are changing perfectly.
Is there something I can do to make the refresh command only run after the write ones? it is already after the write one but still getting executed together (i think)
That's a weird behavior. The /refresh.ps3 is performed asynchronously but it should happen after the previous commands.
You could try adding a wait command before /refresh.ps3 or try sending multiple requests in a single line separated by a semicolon ;
Probably using in a single line will not work as I use this way in the first script and it has the same issue.
I'll try the wait command and report back.
@aldostools looks like even with the wait command it will not write to the file lol
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=69&pos=0x25;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x27;/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x28;/wait.ps3?9;/wait.ps3?9;/refresh.ps3;/delete.ps3/dev_hdd0/boot_init.txt
@aldostools yeap, removing the refresh.ps3 fixed it again, so i'll remove the comand in the first boot init. swap it and execute in the next reboot
@aldostools Is the script read in real time? or is it cached in memory?
See here:
.
.
.
.
else
/popup.ps3Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro
/beep.ps3?1
/delete.ps3/dev_blind/vsh/resource/theme/01.p3t
/delete.ps3/dev_hdd0/PROISO
/delete.ps3/dev_hdd0/autoexec.bat
/delete.ps3/dev_hdd0/boot_init.txt
/delete.ps3/dev_hdd0/boot_init_swap.txt
/delete.ps3/dev_hdd0/game/PS3ONLINE/USRDIR/settings/installedplugins
/delete.ps3/dev_hdd0/hen/themes
/delete.ps3/dev_hdd0/home/$USERID$/webbrowser/setting.xml
/delete.ps3/dev_hdd0/ingame.bat
/delete.ps3/dev_hdd0/onxmb.bat
/delete.ps3/dev_hdd0/patches.bat
/delete.ps3/dev_hdd0/theme/CD_*.p3t
popup 1
/beep.ps3?1
popup 2
/beep.ps3?2
/delete.ps3/dev_hdd0/tmp/wm_icons/icon_wm_root.png
/move.ps3/dev_hdd0/boot_plugins_firmware_change.txt&to=/dev_hdd0/boot_plugins.txt
/move.ps3/dev_hdd0/xmlhost.off&to=/dev_hdd0/xmlhost
/netstatus.ps3?dns1=1.1.1.1
/netstatus.ps3?dns2=1.0.0.1
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x25
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x253
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x27
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x28
/xmb.ps3$xregistry(/setting/net/dnsFlag)=1
/xmb.ps3$xregistry(/setting/user/$USERID$/browser/exitConfirmation)=0
popup 3
/beep.ps3?3
goto uninstall
end if
:uninstall
popup 4
/popup.ps3*
/refresh.ps3
All commands are executed until the "goto uninstall" but the uninstall commands are not executed, so seems like webman reads the script again after the goto statements right? because as you can see i used
/delete.ps3/dev_hdd0/boot_init.txt
And if i remove this, the uninstall commands are executed
Also I've noticed that beep commands don't work when placed before or after setting a persistent notification. Even when I include wait commands before the persistent notification, the beep doesn't play. It only works if I add another non-persistent notification with a sound
Examples that don't work
/popup.ps3$Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro
/beep.ps3?1
/beep.ps3?1
wait 3
/popup.ps3$Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro
wait 3
/beep.ps3?1
Example that works
/popup.ps3/Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro&snd=1
wait 2
/popup.ps3$Firmware%20Changed!%0AUninstalling%20PS3%E2%84%A2%204K%20Pro
`
``
BTW using goto and calling the refresh.ps3 from there works fine, it avoids any issues.
if exist /dev_flash/vsh/resource/explore/xmb/pro.xml
goto end
else
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x25
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=00&pos=0x253
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x27
/write.ps3/dev_hdd0/tmp/wm_config.bin&t=01&pos=0x28
goto uninstall
end if
goto end
:uninstall
/refresh.ps3
/delete.ps3/dev_hdd0/boot_init.txt
:end
Aldo, sometimes i need to change some webMAN configs, most of the time they work, others not
see here:
I'm just changing the values to 99 and nothing happens, the script is executed but the hex values don't change
Any clue?
BTW the script is named boot_init_firmware_change.txt but i'm renaming it to boot_init.txt in my tests