]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-functions.sh:inst_decompress() simplify function
authorHarald Hoyer <harald@redhat.com>
Fri, 22 Jun 2012 13:09:45 +0000 (15:09 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:25 +0000 (12:41 +0200)
dracut-functions.sh

index 273d2a5945f017c7fa6d6d5e53aa6f46eff07b52..9861bb799de880a16bbb8c73f8001b052d85ee47 100755 (executable)
@@ -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}"