On 06/17/2011 10:54 PM, Aleksandar Radovanovic wrote:
On 06/17/2011 11:49 AM, D.S. Ljungmark wrote:
On Thu, 2011-06-16 at 19:49 +0200, Ithamar R. Adema wrote:
Hi,
On Thu, 2011-06-16 at 12:21 +0200, Jo-Philipp Wich wrote:
Maybe calling "reboot" at all is not such a great idea as it
attempts to run the (former) init scripts to stop them.
Maybe using we should use 'reboot -f' here, as that will skip all
userland 'shutdown' handling and simply call the kernel side reboot
handler?
This *should* flush all disk cache and such, so still be safe from
that point, but keep us out of the usual 'init' handling....
That does sound like a good idea, especially as I suspect part of the
reason that the systems crash is because the mounted&active
filesystem just disappeared, and that the pages of the files needed
were not in active RAM. It basically looks as if things are
attempting to execute pure garbage (Not too surprising, really)
//D.S.
_______________________________________________ openwrt-devel
mailing list openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
# copy initttab and append our stage2 at the end
cp /etc/inittab /tmp/inittab
echo -e "\n::restart:/bin/sh /lib/upgrade/stage2.sh">> /tmp/inittab
# remount it over existing inittab, so we don't disturb the original
mount --bind /tmp/inittab /etc/inittab
# make init re-read inittab
kill -HUP 1
sleep 1
# and make it run all the shutdown hooks and the replace
# itself with our restart hook (/lib/upgrade/stage2.sh)
kill -QUIT 1
Ooops, some wrapping errors there, but you get the gist.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel