|
Harald Hoyer |
c4a5a0 |
From 998bf6e0888d93443278c2ff5335fc594d318e4b Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
c4a5a0 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
c4a5a0 |
Date: Sat, 30 Jun 2012 11:33:19 +0200
|
|
Harald Hoyer |
c4a5a0 |
Subject: [PATCH] dracut.sh: do not lazy resolve "include" directories
|
|
Harald Hoyer |
c4a5a0 |
|
|
Harald Hoyer |
c4a5a0 |
---
|
|
Harald Hoyer |
c4a5a0 |
dracut.sh | 40 +++++++++++++++++++++-------------------
|
|
Harald Hoyer |
c4a5a0 |
1 file changed, 21 insertions(+), 19 deletions(-)
|
|
Harald Hoyer |
c4a5a0 |
|
|
Harald Hoyer |
c4a5a0 |
diff --git a/dracut.sh b/dracut.sh
|
|
Harald Hoyer |
c4a5a0 |
index 1dc8cee..c4562e6 100755
|
|
Harald Hoyer |
c4a5a0 |
--- a/dracut.sh
|
|
Harald Hoyer |
c4a5a0 |
+++ b/dracut.sh
|
|
Harald Hoyer |
c4a5a0 |
@@ -783,6 +783,27 @@ if [[ $no_kernel != yes ]]; then
|
|
Harald Hoyer |
c4a5a0 |
dinfo "*** Installing kernel module dependencies and firmware done ***"
|
|
Harald Hoyer |
c4a5a0 |
fi
|
|
Harald Hoyer |
c4a5a0 |
|
|
Harald Hoyer |
c4a5a0 |
+if [[ $kernel_only != yes ]]; then
|
|
Harald Hoyer |
c4a5a0 |
+ (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]}
|
|
Harald Hoyer |
c4a5a0 |
+
|
|
Harald Hoyer |
c4a5a0 |
+ while pop fstab_lines line; do
|
|
Harald Hoyer |
c4a5a0 |
+ echo "$line 0 0" >> "${initdir}/etc/fstab"
|
|
Harald Hoyer |
c4a5a0 |
+ done
|
|
Harald Hoyer |
c4a5a0 |
+
|
|
Harald Hoyer |
c4a5a0 |
+ for f in $add_fstab; do
|
|
Harald Hoyer |
c4a5a0 |
+ cat $f >> "${initdir}/etc/fstab"
|
|
Harald Hoyer |
c4a5a0 |
+ done
|
|
Harald Hoyer |
c4a5a0 |
+
|
|
Harald Hoyer |
c4a5a0 |
+ if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
|
|
Harald Hoyer |
c4a5a0 |
+ dinfo "*** Resolving executable dependencies ***"
|
|
Harald Hoyer |
c4a5a0 |
+ find "$initdir" -type f \
|
|
Harald Hoyer |
c4a5a0 |
+ '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \
|
|
Harald Hoyer |
c4a5a0 |
+ -not -path '*.ko' -print0 \
|
|
Harald Hoyer |
c4a5a0 |
+ | xargs -r -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H}
|
|
Harald Hoyer |
c4a5a0 |
+ dinfo "*** Resolving executable dependencies done***"
|
|
Harald Hoyer |
c4a5a0 |
+ fi
|
|
Harald Hoyer |
c4a5a0 |
+fi
|
|
Harald Hoyer |
c4a5a0 |
+
|
|
Harald Hoyer |
c4a5a0 |
while pop include_src src && pop include_target tgt; do
|
|
Harald Hoyer |
c4a5a0 |
if [[ $src && $tgt ]]; then
|
|
Harald Hoyer |
c4a5a0 |
if [[ -f $src ]]; then
|
|
Harald Hoyer |
c4a5a0 |
@@ -810,25 +831,6 @@ while pop include_src src && pop include_target tgt; do
|
|
Harald Hoyer |
c4a5a0 |
done
|
|
Harald Hoyer |
c4a5a0 |
|
|
Harald Hoyer |
c4a5a0 |
if [[ $kernel_only != yes ]]; then
|
|
Harald Hoyer |
c4a5a0 |
- (( ${#install_items[@]} > 0 )) && dracut_install ${install_items[@]}
|
|
Harald Hoyer |
c4a5a0 |
-
|
|
Harald Hoyer |
c4a5a0 |
- while pop fstab_lines line; do
|
|
Harald Hoyer |
c4a5a0 |
- echo "$line 0 0" >> "${initdir}/etc/fstab"
|
|
Harald Hoyer |
c4a5a0 |
- done
|
|
Harald Hoyer |
c4a5a0 |
-
|
|
Harald Hoyer |
c4a5a0 |
- for f in $add_fstab; do
|
|
Harald Hoyer |
c4a5a0 |
- cat $f >> "${initdir}/etc/fstab"
|
|
Harald Hoyer |
c4a5a0 |
- done
|
|
Harald Hoyer |
c4a5a0 |
-
|
|
Harald Hoyer |
c4a5a0 |
- if [[ $DRACUT_RESOLVE_LAZY ]] && [[ $DRACUT_INSTALL ]]; then
|
|
Harald Hoyer |
c4a5a0 |
- dinfo "*** Resolving executable dependencies ***"
|
|
Harald Hoyer |
c4a5a0 |
- find "$initdir" -type f \
|
|
Harald Hoyer |
c4a5a0 |
- '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')' \
|
|
Harald Hoyer |
c4a5a0 |
- -not -path '*.ko' -print0 \
|
|
Harald Hoyer |
c4a5a0 |
- | xargs -0 $DRACUT_INSTALL ${initdir+-D "$initdir"} -R ${DRACUT_FIPS_MODE+-H}
|
|
Harald Hoyer |
c4a5a0 |
- dinfo "*** Resolving executable dependencies done***"
|
|
Harald Hoyer |
c4a5a0 |
- fi
|
|
Harald Hoyer |
c4a5a0 |
-
|
|
Harald Hoyer |
c4a5a0 |
# make sure that library links are correct and up to date
|
|
Harald Hoyer |
c4a5a0 |
for f in /etc/ld.so.conf /etc/ld.so.conf.d/*; do
|
|
Harald Hoyer |
c4a5a0 |
[[ -f $f ]] && inst_simple "$f"
|