Michal Soltys | 10 May 2011 14:36

Two small patches


Michal Soltys (2):
  dracut-functions: update inst_binary()
  dracut-functions: remove find_rule()

 dracut-functions |   40 +++++++++++++++++-----------------------
 1 files changed, 17 insertions(+), 23 deletions(-)

--

-- 
1.7.2.1

Michal Soltys | 10 May 2011 14:36

[PATCH 1/2] dracut-functions: update inst_binary()

This update adds support for sort-of corner case - when explicitly
specified binary (e.g. through dracut_install or inst) is a library
itself.

In such case, we would expect the binary to undergo typical
library-related handling (symlinks and such).

Apart from that, the patch cleans indenting and a few unused variables
in inst_binary() (probably leftovers from the past ?)

Signed-off-by: Michal Soltys <soltys@...>
---
 dracut-functions |   31 +++++++++++++++++--------------
 1 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 41187e0..959c1d3 100755
--- a/dracut-functions
+++ b/dracut-functions
 <at>  <at>  -32,9 +32,6  <at>  <at>  if ! type dinfo >/dev/null 2>&1; then
     dlog_init
 fi

-IF_RTLD=""
-IF_dynamic=""
-
 # Generic substring function.  If $2 is in $1, return 0.
 strstr() { [[ $1 =~ $2 ]]; }

 <at>  <at>  -330,14 +327,20  <at>  <at>  find_binary() {
(Continue reading)

Michal Soltys | 10 May 2011 14:36

[PATCH 2/2] dracut-functions: remove find_rule()

Not used anymore.

Signed-off-by: Michal Soltys <soltys@...>
---
 dracut-functions |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 959c1d3..ae3d265 100755
--- a/dracut-functions
+++ b/dracut-functions
 <at>  <at>  -396,15 +396,6  <at>  <at>  inst_symlink() {
         ln -sfn "$realsrc" "$target"
 }

-# find a udev rule in the usual places.
-find_rule() {
-    [[ -f $1 ]] && { echo "$1"; return 0; }
-    for r in . /lib/udev/rules.d /etc/udev/rules.d $dracutbasedir/rules.d; do
-        [[ -f $r/$1 ]] && { echo "$r/$1"; return 0; }
-    done
-    return 1
-}
-
 # udev rules always get installed in the same place, so
 # create a function to install them to make life simpler.
 inst_rules() {
--

-- 
1.7.2.1

(Continue reading)


Gmane