Hi James,
I looked a bit in what you are doing (if I understand it right) and
suggest the following (doing something similar on some of my systems):
Startup your system from initramfs and setup required root file system
do switch_root starting /bin/busybox init on your root file system
with inittab containing (among others):
::shutdown:SHUTDOWN_ACTION
::restart:/bin/busybox sh YOUR_SHUTDOWN_SCRIPT
when done with your system, send PID #1 the SIGQUIT signal
this shall do all shutdown actions from your inittab and then exec in
shell with your given shutdown script (shell running as pid #1).
reload a busybox system into your original root file system (has bean
cleared by switch_root to save space) e.g. from a cpio archiv (better
than tar).
pivot_root to your original root system
unmount your stacked file systems
do whatever backup you need (e.g. copy from tmpfs to persistent storage)
poweroff/reboot your system
Did I get it right?
--
Harald
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox