dracut/0070-dracut-functions.sh-inst_decompress-simplify-functio.patch
Harald Hoyer 53e9906e08 dracut-019-92.git20120625
- support vlan tagged binding
- speedup initramfs emergency service
- speedup image creation
- fix installkernel() return codes
Resolves: rhbz#833256
- add qemu and qemu-net modules to add qemu drivers even in host-only
- speedup btrfs and xfs fsck (nop)
- no more mknod in the initramfs (fixes plymouth on s390)
2012-06-25 14:08:03 +02:00

45 lines
1.6 KiB
Diff

From 04569ec8da0a553a7e4dfd37ce1d62508e3441eb Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 22 Jun 2012 15:09:45 +0200
Subject: [PATCH] dracut-functions.sh:inst_decompress() simplify function
---
dracut-functions.sh | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 273d2a5..9861bb7 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -773,7 +773,7 @@ inst_libdir_file() {
# Function install targets in the same paths inside overlay but decompressed
# and without extensions (.gz, .bz2).
inst_decompress() {
- local _src _dst _realsrc _realdst _cmd
+ local _src _cmd
for _src in $@
do
@@ -782,20 +782,7 @@ inst_decompress() {
*.bz2) _cmd='bzip2 -d' ;;
*) return 1 ;;
esac
-
- if [[ -L ${_src} ]]
- then
- _realsrc="$(readlink -f ${_src})" # symlink target with extension
- _dst="${_src%.*}" # symlink without extension
- _realdst="${_realsrc%.*}" # symlink target without extension
- mksubdirs "${initdir}/${_src}"
- # Create symlink without extension to target without extension.
- ln -sfn "${_realdst}" "${initdir}/${_dst}"
- fi
-
- # If the source is symlink we operate on its target.
- [[ ${_realsrc} ]] && _src=${_realsrc}
- inst ${_src}
+ inst_simple ${_src}
# Decompress with chosen tool. We assume that tool changes name e.g.
# from 'name.gz' to 'name'.
${_cmd} "${initdir}${_src}"