lzm 2> /dev/null 1> /dev/null
As you can see, we chose to name the module zchanges.lzm, allowing it to load last,
assuring that other configuration changes have already happened. Dir2lzm is just a
wrapper for mksquashfs, so we call it directly allowing the home and root changes to
both get into the zchanges.lzm. The most convenient place for this set of commands is
/etc/rc.d/rc.6. After you edit /etc/rc.d/rc.6, you can make it into a module with the following
set of commands:
bt ~ # mkdir ??“p MODULE/etc/rc.d
bt ~ # cp /etc/rc.d/rc.6 MODULE/etc/rc.d/
bt ~ # dir2lzm MODULE/ preserve-changes.lzm
[==================================================] 1/1 100%
bt ~ # cp preserve-changes.lzm /mnt/sdb1_removable/bt/modules/
This setup works great but there is one last wrinkle to either ignore or troubleshoot
away. Imagine this scenario:
Session 1 Boot A module places file.dat into /root
Session 1 Usage User removes /root/file.dat
Session 1 Reboot Change detected to remove /root/file.dat; removal preserved in zchanges.lzm
Session 2 Boot A module places file.dat into /root; zchanges.lzm removes /root/file.dat
At this point, everything is fine. The system is in the same state at the conclusion of
the session2 boot as itwas at the beginning of the session1 reboot.
Pages:
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261