Page MenuHomeFreeBSD

D6664.1774705685.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D6664.1774705685.diff

Index: etc/rc.initdiskless
===================================================================
--- etc/rc.initdiskless
+++ etc/rc.initdiskless
@@ -350,25 +350,26 @@
# from being copied.
for i in ${templates} ; do
- for j in /conf/$i/* ; do
- subdir=${j##*/}
+ template_root="/conf/$i/"
+ for j in `find ${template_root}/* -type d 2>/dev/null` ; do
+ subdir=${j#$template_root}
if [ -d $j -a ! -f $j.cpio.gz ]; then
create_md $subdir
cp -Rp $j/ /$subdir
fi
done
- for j in /conf/$i/*.cpio.gz ; do
+ for j in `find $template_root -name '*.cpio.gz' 2>/dev/null` ; do
subdir=${j%*.cpio.gz}
- subdir=${subdir##*/}
+ subdir=${subdir#$template_root}
if [ -f $j ]; then
create_md $subdir
echo "Loading /$subdir from cpio archive $j"
(cd / ; /rescue/tar -xpf $j)
fi
done
- for j in /conf/$i/*.remove ; do
+ for j in `find $template_root -name '*.remove' 2> /dev/null` ; do
subdir=${j%*.remove}
- subdir=${subdir##*/}
+ subdir=${subdir#$template_root}
if [ -f $j ]; then
# doubly sure it is a memory disk before rm -rf'ing
create_md $subdir

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 28, 1:48 PM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28218359
Default Alt Text
D6664.1774705685.diff (1 KB)

Event Timeline