Blob Blame History Raw
From 374ef3ed2bff30db35126dd694b4234709398a2f Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Mon, 11 Apr 2016 13:36:06 +0200
Subject: [PATCH] dracut-init.sh: Add file argument to sed's

fixup for 06a1d0769055f437c938edd40bd9fbd622475864
---
 dracut-init.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dracut-init.sh b/dracut-init.sh
index b176421..2431171 100644
--- a/dracut-init.sh
+++ b/dracut-init.sh
@@ -275,7 +275,7 @@ rev_lib_symlinks() {
 inst_rule_programs() {
     local _prog _bin
 
-    for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p'); do
+    for _prog in $(sed -nr 's/.*PROGRAM==?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
         if [ -x ${udevdir}/$_prog ]; then
             _bin=${udevdir}/$_prog
@@ -288,7 +288,7 @@ inst_rule_programs() {
 
         [[ $_bin ]] && inst_binary "$_bin"
     done
-    for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p'); do
+    for _prog in $(sed -nr 's/.*RUN[+=]=?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
         if [ -x ${udevdir}/$_prog ]; then
             _bin=${udevdir}/$_prog
@@ -301,7 +301,7 @@ inst_rule_programs() {
 
         [[ $_bin ]] && inst_binary "$_bin"
     done
-    for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p'); do
+    for _prog in $(sed -nr 's/.*IMPORT\{program\}==?"([^ "]+).*/\1/p' "$1"); do
         _bin=""
         if [ -x ${udevdir}/$_prog ]; then
             _bin=${udevdir}/$_prog
@@ -320,7 +320,7 @@ inst_rule_programs() {
 inst_rule_group_owner() {
     local i
 
-    for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p'); do
+    for i in $(sed -nr 's/.*OWNER=?"([^ "]+).*/\1/p' "$1"); do
         if ! grep -Eq "^$i:" "$initdir/etc/passwd" 2>/dev/null; then
             grep -E "^$i:" /etc/passwd 2>/dev/null >> "$initdir/etc/passwd"
         fi