Creating a current armbian-Image with network-fix
#11
Hi,

I have no problem modifying the sun50i-a64-sopine-baseboard.dtb file and the fix script by @Dippywood also works like a charm!

However, I wanted to execute the fix script from the rc.local script during boot, as @Dippywood suggests. This does not work for me.

I placed the script (called it clusterboard_dtb_fix.sh, with execution bit set) in /usr/local/bin and added the line "/usr/local/bin/clusterboard_dtb_fix.sh" to rc.local. (I also tried "sudo /usr/local/bin/clusterboard_dtb_fix.sh" in rc.local). Then I made sure that it worked, by executing the rc.local script when I was logged in on the module. No problem, the rc.local script, and thus fix script, is working when manually executed.

Then I tried to look in the log (using journalctl -b) after a reboot and here I see “Nov 10 21:23:30 pine64so rc.local[967]: Fix already in place” so the script is executed during boot! (But not after an apt-get upgrade :-()

My best guess is that calling the script from rc.local is too late in the boot process, thus it is not working.

Has anybody successfully added a call to rc.local that actually works on boot?

Well, I could just remember to execute the fix script after each apt-get upgrade, but it would be so much nicer if it was applied automatic during boot of the module.


Kind regards,

Anders.
  Reply
#12
(11-10-2020, 02:41 PM)sejersbol Wrote: Hi,

I have no problem modifying the sun50i-a64-sopine-baseboard.dtb file and the fix script by @Dippywood also works like a charm!

However, I wanted to execute the fix script from the rc.local script during boot, as @Dippywood suggests. This does not work for me.

I placed the script (called it clusterboard_dtb_fix.sh, with execution bit set) in /usr/local/bin and added the line "/usr/local/bin/clusterboard_dtb_fix.sh" to rc.local. (I also tried "sudo /usr/local/bin/clusterboard_dtb_fix.sh" in rc.local). Then I made sure that it worked, by executing the rc.local script when I was logged in on the module. No problem, the rc.local script, and thus fix script, is working when manually executed.

Then I tried to look in the log (using journalctl -b) after a reboot and here I see “Nov 10 21:23:30 pine64so rc.local[967]: Fix already in place” so the script is executed during boot! (But not after an apt-get upgrade :-()

My best guess is that calling the script from rc.local is too late in the boot process, thus it is not working.

Has anybody successfully added a call to rc.local that actually works on boot?

Well, I could just remember to execute the fix script after each apt-get upgrade, but it would be so much nicer if it was applied automatic during boot of the module.


Kind regards,

Anders.


Instead of calling it at boot, it's better to call it as a hook after apt runs. That way it runs the script post upgrade and before it'd be loaded on next boot. 

I added a file in /etc/apt/apt.conf.d/100update with the contents of:



Code:
DPkg::Post-Invoke {"/usr/local/bin/fix-network-dtb.sh";};
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Clusterboard Armbian aww 17 8,253 07-01-2020, 02:40 PM
Last Post: wayward83
  Network problems (actually bad power supply) Unkn0wn 14 4,551 12-01-2019, 10:02 AM
Last Post: venix1
  Armbian Bionic 4.19.y PigLover 1 731 02-02-2019, 02:30 PM
Last Post: mdmbc

Forum Jump:


Users browsing this thread: 1 Guest(s)