Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024

Warning: mysqli_query(): (HY000/1021): Disk full (/tmp/#sql-a2c-1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device") in /var/www/html/wp-includes/wp-db.php on line 2024
class="post-443342 post type-post status-publish format-standard hentry" id="post-443342">

systemd rc.local race condition

Forgive me, I am newer to Linux/Debian/Raspian.

The company I work for has a bash script being run from rc.local that updates /etc/hostname file on bootup of a raspberry pi based on the MAC Address of one of the network interfaces found on said pi, keeping the hostnames unique for each unit.

We also have an executable being run from systemd (sudo systemctl enable [executable-name]) that reads this /etc/hostname file first thing when it starts to see what it’s hostname is.

We are finding occasionally after we image the SD card with this script on it that our executable is starting up/reading this /etc/hostname file and getting the old hostname read into memory in the executable. (Second boot is ok because the script has already written to the /etc/hostname file at least once the correct information).

Is there a way to set up the systemd executable to wait till the rc.local bash file has finished completely before starting the systemd executable. Some Requires variable or something.

Leave a Reply

Your email address will not be published. Required fields are marked *