UPDATE:
I seem to have stumbled upon an implementation difference between the GNU and Busybox versions of cpio. They seem to behave the same if given file names that do not begin with "/". For example,
( cd / ; echo etc/hostname | cpio -p -d /tmp/test )
works with both versions while
( cd / ; echo /etc/hostname | cpio -p -d /tmp/test )
works with GNU cpio but not Busybox cpio.
The following script was executed after booting the Micro Core 2.7 ISO:
tce-load -w -i cpio.tcz
echo
ls -l /bin/cpio
for program in /usr/local/bin/cpio /bin/cpio ; do
echo
echo === $program ===
rm -fR /tmp/test
echo /etc/hostname | $program -p -d /tmp/test
ls -lR /tmp/test/etc
done
GNU cpio (/usr/local/bin/cpio) copies /etc/hostname to /tmp/test/etc/hostname as expected, but Busybox cpio (/bin/cpio) does not:
lrwxrwxrwx 1 root root 7 Jan 1 22:54 /bin/cpio -> busybox
=== /usr/local/bin/cpio ===
1 block
/tmp/test/etc:
-rw-r--r-- 1 tc staff 4 Jan 1 23:21 hostname
=== /bin/cpio ===
cpio: /etc/hostname not created: newer or same age file exists
1 blocks
ls: /tmp/test/etc: No such file or directory