Dirk Nehring dixit: >as I understand, fwcf uses lzo as compressor. Do we really need the tar >and gzip dependency for busybox? We deselect it normally since we have >not enough space for openvpn and openswan (on a 4 MByte flash)!
The following parts of fwcf.sh use it: | (cd /tmp/.fwcf/root; tar cf - .) | (cd /tmp/.fwcf/temp; tar xpf -) | (cd /etc; tar cf - .) | (cd /tmp/.fwcf/temp; tar xpf -) Quick copying of files while preserving *all* attributes; could be replaced with pax, but busybox doesn't even have that. | find . -type f | grep -v -e '^./.fwcf' -e '^./.rnd$' | sort | \ | xargs md5sum | sed 's! ./! !' | gzip -9 >/tmp/.fwcf/status.gz | find . -type f | grep -v -e '^./.fwcf' -e '^./.rnd$' | sort | \ | xargs md5sum | sed 's! ./! !' | gzip -9 >/tmp/.fwcf/status.gz | gzip -d <$f.gz >$f || rm -f $f This is for “fwcf status”, to save (lots of) space in the tmpfs. After all, the status file contains 34+n bytes per file, where n is the length of the file name. There is theoreticaly no reason to prevent throwing it out; if we have, say, 300 files in /etc, the status file would be at about 16 KiB uncompressed; if you can justify the RAM use… | tar -czf "$fn" dump seed | if ! tar -xzf "$fn"; then This is for “fwcf dump” and “fwcf restore”; while I'd like to keep them, I could replace that by not gzipping them or even just catting them together if we chose to remove the tar and/or gzip uses above (although I don't really think we could get rid of tar). Note that the last of the three use cases must be decided upon before we release fwcf 1.03, because it defines the backup format. bye, //mirabile -- I believe no one can invent an algorithm. One just happens to hit upon it when God enlightens him. Or only God invents algorithms, we merely copy them. If you don't believe in God, just consider God as Nature if you won't deny existence. -- Coywolf Qi Hunt _______________________________________________ freewrt-developers mailing list [email protected] https://www.freewrt.org/lists/listinfo/freewrt-developers
