Harald Hoyer 12f6cc
From c072e131622f41ed90cf0d1510c96dd7cb0aad7a Mon Sep 17 00:00:00 2001
Harald Hoyer 12f6cc
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 12f6cc
Date: Tue, 24 Jul 2012 14:12:36 +0200
Harald Hoyer 12f6cc
Subject: [PATCH] get rid of "basename"
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
---
Harald Hoyer 12f6cc
 dracut-functions.sh                    | 12 ++++++------
Harald Hoyer 12f6cc
 lsinitrd.sh                            |  2 +-
Harald Hoyer 12f6cc
 modules.d/95udev-rules/module-setup.sh |  2 +-
Harald Hoyer 12f6cc
 3 files changed, 8 insertions(+), 8 deletions(-)
Harald Hoyer 12f6cc
Harald Hoyer 12f6cc
diff --git a/dracut-functions.sh b/dracut-functions.sh
Harald Hoyer 12f6cc
index 7f834f0..14c100d 100755
Harald Hoyer 12f6cc
--- a/dracut-functions.sh
Harald Hoyer 12f6cc
+++ b/dracut-functions.sh
Harald Hoyer 12f6cc
@@ -710,12 +710,12 @@ inst_rule_programs() {
Harald Hoyer 12f6cc
                 _bin=${udevdir}/$_prog
Harald Hoyer 12f6cc
             else
Harald Hoyer 12f6cc
                 _bin=$(find_binary "$_prog") || {
Harald Hoyer 12f6cc
-                    dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found"
Harald Hoyer 12f6cc
+                    dinfo "Skipping program $_prog using in udev rule $(${1##*/}) as it cannot be found"
Harald Hoyer 12f6cc
                     continue;
Harald Hoyer 12f6cc
                 }
Harald Hoyer 12f6cc
             fi
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
-            #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)"
Harald Hoyer 12f6cc
+            #dinfo "Installing $_bin due to it's use in the udev rule $(${1##*/})"
Harald Hoyer 12f6cc
             dracut_install "$_bin"
Harald Hoyer 12f6cc
         done
Harald Hoyer 12f6cc
     fi
Harald Hoyer 12f6cc
@@ -725,12 +725,12 @@ inst_rule_programs() {
Harald Hoyer 12f6cc
                 _bin=${udevdir}/$_prog
Harald Hoyer 12f6cc
             else
Harald Hoyer 12f6cc
                 _bin=$(find_binary "$_prog") || {
Harald Hoyer 12f6cc
-                    dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found"
Harald Hoyer 12f6cc
+                    dinfo "Skipping program $_prog using in udev rule $(${1##*/}) as it cannot be found"
Harald Hoyer 12f6cc
                     continue;
Harald Hoyer 12f6cc
                 }
Harald Hoyer 12f6cc
             fi
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
-            #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)"
Harald Hoyer 12f6cc
+            #dinfo "Installing $_bin due to it's use in the udev rule $(${1##*/})"
Harald Hoyer 12f6cc
             dracut_install "$_bin"
Harald Hoyer 12f6cc
         done
Harald Hoyer 12f6cc
     fi
Harald Hoyer 12f6cc
@@ -740,12 +740,12 @@ inst_rule_programs() {
Harald Hoyer 12f6cc
                 _bin=${udevdir}/$_prog
Harald Hoyer 12f6cc
             else
Harald Hoyer 12f6cc
                 _bin=$(find_binary "$_prog") || {
Harald Hoyer 12f6cc
-                    dinfo "Skipping program $_prog using in udev rule $(basename $1) as it cannot be found"
Harald Hoyer 12f6cc
+                    dinfo "Skipping program $_prog using in udev rule $(${1##*/}) as it cannot be found"
Harald Hoyer 12f6cc
                     continue;
Harald Hoyer 12f6cc
                 }
Harald Hoyer 12f6cc
             fi
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
-            #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)"
Harald Hoyer 12f6cc
+            #dinfo "Installing $_bin due to it's use in the udev rule $(${1##*/})"
Harald Hoyer 12f6cc
             dracut_install "$_bin"
Harald Hoyer 12f6cc
         done
Harald Hoyer 12f6cc
     fi
Harald Hoyer 12f6cc
diff --git a/lsinitrd.sh b/lsinitrd.sh
Harald Hoyer 12f6cc
index a844932..3d6084d 100755
Harald Hoyer 12f6cc
--- a/lsinitrd.sh
Harald Hoyer 12f6cc
+++ b/lsinitrd.sh
Harald Hoyer 12f6cc
@@ -21,7 +21,7 @@
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 usage()
Harald Hoyer 12f6cc
 {
Harald Hoyer 12f6cc
-    echo "Usage: $(basename $0) [-s] [<initramfs file> [<filename>]]"
Harald Hoyer 12f6cc
+    echo "Usage: $(${0##*/}) [-s] [<initramfs file> [<filename>]]"
Harald Hoyer 12f6cc
 }
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
 [[ $# -le 2 ]] || { usage ; exit 1 ; }
Harald Hoyer 12f6cc
diff --git a/modules.d/95udev-rules/module-setup.sh b/modules.d/95udev-rules/module-setup.sh
Harald Hoyer 12f6cc
index 90d4336..2e3c955 100755
Harald Hoyer 12f6cc
--- a/modules.d/95udev-rules/module-setup.sh
Harald Hoyer 12f6cc
+++ b/modules.d/95udev-rules/module-setup.sh
Harald Hoyer 12f6cc
@@ -8,7 +8,7 @@ install() {
Harald Hoyer 12f6cc
     # Fixme: would be nice if we didn't have to know which rules to grab....
Harald Hoyer 12f6cc
     # ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
Harald Hoyer 12f6cc
     # of the rules we want so that we just copy those in would be best
Harald Hoyer 12f6cc
-    dracut_install udevadm cat uname basename blkid \
Harald Hoyer 12f6cc
+    dracut_install udevadm cat uname blkid \
Harald Hoyer 12f6cc
         /etc/udev/udev.conf /etc/group
Harald Hoyer 12f6cc
 
Harald Hoyer 12f6cc
     [ -d ${initdir}/lib/systemd ] || mkdir -p ${initdir}/lib/systemd