mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Doing a cpio from /var/empty if dir was not specified or non-existent
copies its mode to the destination. This is not desirable. Rephrase this code to be more sensible. PR: 173483 MFC after: 1 week
This commit is contained in:
parent
62cc3a6314
commit
2b235be6d3
1 changed files with 7 additions and 6 deletions
|
|
@ -413,12 +413,13 @@ populate_slice ( ) (
|
|||
dir=$2
|
||||
mnt=$3
|
||||
lbl=$4
|
||||
test -z $2 && dir=${NANO_WORLDDIR}/var/empty
|
||||
test -d $dir || dir=${NANO_WORLDDIR}/var/empty
|
||||
echo "Creating ${dev} with ${dir} (mounting on ${mnt})"
|
||||
newfs_part $dev $mnt $lbl
|
||||
cd ${dir}
|
||||
find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
|
||||
echo "Creating ${dev} (mounting on ${mnt})"
|
||||
newfs_part ${dev} ${mnt} ${lbl}
|
||||
if [ -n "${dir}" -a -d "${dir}" ]; then
|
||||
echo "Populating ${lbl} from ${dir}"
|
||||
cd ${dir}
|
||||
find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${mnt}
|
||||
fi
|
||||
df -i ${mnt}
|
||||
umount ${mnt}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue