I have a question. I would like to check when the raspi system starts or if the serial cpu is correct. If not, he would be rebooting. So he would be doing reboot loops all the time. I found the command to check the serial cpu command:
cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2
How to compare the result of this command to the value of eg 000000ddd0d0d?? And I do not know how to look like such a check script and where to put it in the Ubuntu system (/etc/init.d/rc.local ??).
Thank you for your help Sorry for my English. It is correctly??:
#!/bin/bash
STR=cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2
if $STR != '000000ddd0d0d'; then
reboot