Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
playground
>
dracut
> 0146-mdraid-parse-md.sh-create-new-rules-then-mv-to-old-o.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0146-mdraid-parse-md.sh-create-new-rules-then-mv-to-old-o.patch of Package dracut
From f8dd8dcf14fa3992a90fb4e631c248069fe8ea20 Mon Sep 17 00:00:00 2001 From: Harald Hoyer <harald@redhat.com> Date: Mon, 6 Dec 2010 16:05:37 +0100 Subject: [PATCH] mdraid/parse-md.sh: create new rules, then mv to old one If udevd is already running, then we should assemble the new rules files in a seperate file first, before calling it *.rules Resolves: rhbz#595096 --- modules.d/90mdraid/parse-md.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/modules.d/90mdraid/parse-md.sh b/modules.d/90mdraid/parse-md.sh index 6e2a3bf..c4638f8 100644 --- a/modules.d/90mdraid/parse-md.sh +++ b/modules.d/90mdraid/parse-md.sh @@ -6,21 +6,20 @@ else # rewrite the md rules to only process the specified raid array if [ -n "$MD_UUID" ]; then - for f in /etc/udev/rules.d/65-md-incremental*.rules; do - [ -e "$f" ] || continue - mv $f ${f}.bak - while read line; do - if [ "${line%%UUID CHECK}" != "$line" ]; then - for uuid in $MD_UUID; do - printf 'ENV{MD_UUID}=="%s", GOTO="do_md_inc"\n' $uuid - done; - printf 'GOTO="md_inc_end"\n'; - else - echo $line; - fi - done < ${f}.bak > $f - rm ${f}.bak - done + for f in /etc/udev/rules.d/65-md-incremental*.rules; do + [ -e "$f" ] || continue + while read line; do + if [ "${line%%UUID CHECK}" != "$line" ]; then + for uuid in $MD_UUID; do + printf 'ENV{MD_UUID}=="%s", GOTO="do_md_inc"\n' $uuid + done; + printf 'GOTO="md_inc_end"\n'; + else + echo $line; + fi + done < "${f}" > "${f}.new" + mv "${f}.new" "$f" + done fi fi -- 1.8.3.1