dracut.sh: speedup "strip"
parent
744054779f
commit
69b35075f3
10
dracut.sh
10
dracut.sh
|
@ -844,7 +844,7 @@ fi
|
||||||
|
|
||||||
# strip binaries
|
# strip binaries
|
||||||
if [[ $do_strip = yes ]] ; then
|
if [[ $do_strip = yes ]] ; then
|
||||||
for p in strip grep find; do
|
for p in strip xargs find; do
|
||||||
if ! type -P $p >/dev/null; then
|
if ! type -P $p >/dev/null; then
|
||||||
derror "Could not find '$p'. You should run $0 with '--nostrip'."
|
derror "Could not find '$p'. You should run $0 with '--nostrip'."
|
||||||
do_strip=no
|
do_strip=no
|
||||||
|
@ -853,12 +853,10 @@ if [[ $do_strip = yes ]] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $do_strip = yes ]] ; then
|
if [[ $do_strip = yes ]] ; then
|
||||||
for f in $(find "$initdir" -type f \
|
find "$initdir" -type f \
|
||||||
\( -perm -0100 -or -perm -0010 -or -perm -0001 \
|
\( -perm -0100 -or -perm -0010 -or -perm -0001 \
|
||||||
-or -path '*/lib/modules/*.ko' \) ); do
|
-or -path '*/lib/modules/*.ko' \) -print0 \
|
||||||
dinfo "Stripping $f"
|
| xargs -0 strip -g 2>/dev/null
|
||||||
strip -g "$f" 2>/dev/null|| :
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
type hardlink &>/dev/null && {
|
type hardlink &>/dev/null && {
|
||||||
|
|
Loading…
Reference in New Issue