Bug #1568

[PATCH] etc/rc.d/initdiskless confusion regarding cpio archives

Added by rumcic almost 7 years ago. Updated over 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


"If /conf/<special_dir>/SUBDIR.cpio.gz exists, the file is cpio'd into the
specified /SUBDIR (and a memory filesystem is created for /SUBDIR if
.. but to unpack the archive it uses:
"(cd / ; /usr/bin/gzip -d < $j | /usr/bin/cpio --extract -d )"

Is it just me or is there a contradiction there? English is not my native
language , so I could be misunderstanding, but my interpretation of "the file
is cpio'd into the specified /SUBDIR" would be to cd into /SUBDIR and extract
the archive there.
Also checked freebsd's head and they have the same contradiction.

Since it's more in line with other stuff in initdiskless (like SUBDIR.remove
which removes files relative to SUBDIR), I'd prefer something like the
attached patch (also gzip is skipped in the attached patch since cpio itself
seems to be able to read the gzipped archive).

initdiskless.patch Magnifier (480 Bytes) rumcic, 10/13/2009 10:46 AM


#1 Updated by josepht over 6 years ago

patch committed.

Also available in: Atom PDF