running custom commands during sysupgrade - to free ram

Sven Roederer devel-sven at geroedel.de
Sat Nov 21 21:20:24 EST 2020


Am Sonntag, 18. Oktober 2020, 18:59:19 CET schrieb Sven Roederer:
> > > fail -------------------------------
> > > root at gib-mir-einen-namen:~# cat /lib/upgrade/freifunk-berlin_freeup-
> > > ram.sh
> > > ffberlin_freeup_ram() {
> > > 
> > > # stop uhttpd and luci
> > > /etc/init.d/uhttpd stop
> > > # remove LuCI-caches
> > > rm >/dev/null -f /tmp/luci-indexcache*
> > > rm >/dev/null -rf /tmp/luci-modulecache } ffberlin_freeup_ram
> > > 
> > > -----------------------------------
> > > 
> > > The Upgrade starts as expected and runs up to
> > > 
> > > Saving config files...
> > > Commencing upgrade. Closing all shell sessions.
> > > 
> > > and then times out. on the serial console I can see that the board just
> > > reboots after some time.  Normally it will do:
> > > 
> > > Watchdog handover: fd=3
> > > - watchdog -
> > > killall: telnetd: no process killed
> > > killall: ash: no process killed
> > > Sending TERM to remaining processes ... netifd odhcpd uhttpd udhcpc
> > > odhcp6c ntpd dnsmasq pingcheck crond ubusd askfirst urngd logd rpcd
> > > hostapd Sending KILL to remaining processes ... netifd uhttpd dnsmasq
> > > pingcheck sh sh rpcd netifd uhttpd dnsmasq sh rpcd rpcd Switching to
> > > ramdisk...
> > > Performing system upgrade...
> > > Unlocking firmware ...
> > > 
> > > Writing from <stdin> to firmware ...
> > > Appending jffs2 data from /tmp/sysupgrade.tgz to firmware..
> > > 
> > > Upgrade completed
> > > Rebooting system...
> > > umount: can't unmount /dev: Resource busy
> > > umount: can't unmount /tmp: Resource busy [  343.465535] reboot:
> > > Restarting system
> > > 
> > > 
> > > Any idea what is causing this behavior?
> > > Is my idea a totally wrong approach?

As there was no other comment beside Adrians nice tip, I assume there is at 
least no obvious reason why my approachs fails. 
I'll see if I can find a way, to make this script running before flashing, 
even if I have to patch sysupgrade for this.

Best Sven





More information about the openwrt-devel mailing list