看板 DFBSD_submit 關於我們 聯絡資訊
--nextPart2199326.se6orYecl1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit "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 necessary)." .... 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). -- Regards, Rumko --nextPart2199326.se6orYecl1 Content-Type: text/x-diff; name="initdiskless.patch" Content-Transfer-Encoding: 8Bit Content-Disposition: attachment; filename="initdiskless.patch" diff --git a/etc/rc.d/initdiskless b/etc/rc.d/initdiskless index 58e725f..ef5a329 100644 --- a/etc/rc.d/initdiskless +++ b/etc/rc.d/initdiskless @@ -225,7 +225,7 @@ for i in base default ${bootp_ipbca} ${bootp_ipa} ; do if [ -f $j ]; then create_md $subdir echo "Loading /$subdir from cpio archive $j" - (cd / ; /usr/bin/gzip -d < $j | /usr/bin/cpio --extract -d ) + (cd /$subdir ; /usr/bin/cpio --extract -d -F $j ) fi done for j in /conf/$i/*.remove ; do --nextPart2199326.se6orYecl1--