| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- @echo off
- echo.
- echo [WaouW] Correction du chemin firstrun.sh
- echo ========================================
- echo.
- REM Détecter la partition boot
- for %%d in (D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
- if exist %%d:\cmdline.txt (
- set BOOT_DRIVE=%%d:
- goto :found_boot
- )
- )
- echo [ERREUR] Partition boot non detectee
- pause
- exit /b 1
- :found_boot
- echo [INFO] Partition boot detectee : %BOOT_DRIVE%
- echo [INFO] Modification de cmdline.txt pour pointer vers notre script...
- REM Lire le contenu actuel
- for /f "delims=" %%i in (%BOOT_DRIVE%\cmdline.txt) do set CMDLINE=%%i
- REM Remplacer /boot/firmware/firstrun.sh par /boot/firstrun.sh
- set CMDLINE=%CMDLINE:/boot/firmware/firstrun.sh=/boot/firstrun.sh%
- REM Écrire le nouveau cmdline.txt
- echo %CMDLINE% > "%BOOT_DRIVE%\cmdline.txt"
- echo [OK] cmdline.txt modifie pour utiliser /boot/firstrun.sh
- echo.
- echo [INFO] Verification du contenu de cmdline.txt :
- type "%BOOT_DRIVE%\cmdline.txt"
- echo.
- echo [SUCCESS] Configuration corrigee !
- echo Le Pi va maintenant executer votre script firstrun.sh au demarrage.
- echo.
- pause
|