If restart = cold start then autostart.sh will be run. If restart = wake from suspend it will not be run, because autostart is a boot script and waking a suspended system is not boot. Your current script forces the entire boot process to stall for 5 secs. It would be better to (background)& the mount task so that boot can continue normally. You can look at using systemd .power functions in /storage/.config/system.d/ to schedule actions around system suspend and wake events.
Hi chewitt, thanks a lot for explaining. Did not know that restart is not shutdown and start. Sometimes things are not as they look like...
I will try the system. d solution or just not use restart.