System: CM5 kiosk running Bookworm, launching a browser at boot.
I have a bash script that runs at boot to launch the browser in kiosk mode, however on the 1st boot up the script detects the presence of a file (1strun.txt) in the home folder and uses the presence of that file to redirect to a setup page, it then deletes the 1strun.txt file so that subsequent boots get the normal start page.
This was all working fine in development, imaging the CM5 and burning it to subsequent CM5 modules also worked - until I shrunk the image file to save storage / allow for CM5's with smaller flash capacity.
Now what appears to happen is the CM5 boots, auto-expands the filesystem, and then gets far enough through booting to run the script but then the device reboots before it's had a chance to load the browser - the 1strun.txt file gets deleted but the setup screen is never shown.
I have confirmed this with some basic logging of my script, which does indeed get as far as trying to start the browser 1st time round only to be reset/rebooted by something (presumably the auto-expansion process/script).
So, my question is is there any way I can detect the situation and just wait for it to finish or otherwise just make sure things are "normal" in my bash script before proceeding?
I have a bash script that runs at boot to launch the browser in kiosk mode, however on the 1st boot up the script detects the presence of a file (1strun.txt) in the home folder and uses the presence of that file to redirect to a setup page, it then deletes the 1strun.txt file so that subsequent boots get the normal start page.
This was all working fine in development, imaging the CM5 and burning it to subsequent CM5 modules also worked - until I shrunk the image file to save storage / allow for CM5's with smaller flash capacity.
Now what appears to happen is the CM5 boots, auto-expands the filesystem, and then gets far enough through booting to run the script but then the device reboots before it's had a chance to load the browser - the 1strun.txt file gets deleted but the setup screen is never shown.
I have confirmed this with some basic logging of my script, which does indeed get as far as trying to start the browser 1st time round only to be reset/rebooted by something (presumably the auto-expansion process/script).
So, my question is is there any way I can detect the situation and just wait for it to finish or otherwise just make sure things are "normal" in my bash script before proceeding?
Statistics: Posted by John_U — Thu Jul 17, 2025 2:57 pm