eb37c150a3
- Do not blindly try to touch the logfile (bnc#893219) * Add 0146-dracut.sh-corrected-logfile-check.patch - Only fix UUID= fstab parsing * Add 0147-dracut.sh-Fix-UUID-fstab-parsing-in-case-mount-optio.patch - Also fix other parsing syntax in fstab like LABEL= * Add 0148-dracut.sh-Fix-LABEL-and-other-fstab-syntax.patch - Fix up some bugs from previous commit * Add 0149-dracut.sh-Fix-fstab-parsing-again.patch - bnc#893615 * Add 0150-Find-kernel-modules-in-extra-and-weak-updates-path-a.patch - pixz does need too much memory, go back to xz in a conservative way (bnc#893981) * Add 0151-Go-back-to-xz-again-pixz-may-use-too-much-memory-whi.patch - Add some default tools to initrd when debug module is included and already provided an commented example line how to easily enable it. No functional change by default. * Add 0152-Add-a-comment-to-easily-add-debug-modules-also-add-v.patch OBS-URL: https://build.opensuse.org/request/show/246856 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=182
34 lines
960 B
Diff
34 lines
960 B
Diff
From 077c4bc889733c6c38b767c99f56ef67a82ef432 Mon Sep 17 00:00:00 2001
|
|
From: jloeser <jloeser@suse.de>
|
|
Date: Fri, 22 Aug 2014 16:31:34 +0200
|
|
Subject: dracut.sh: corrected logfile check
|
|
|
|
---
|
|
dracut.sh | 10 +++++++---
|
|
1 files changed, 7 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/dracut.sh b/dracut.sh
|
|
index ffe4989..5bf41f2 100755
|
|
--- a/dracut.sh
|
|
+++ b/dracut.sh
|
|
@@ -803,9 +803,13 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
|
|
# eliminate IFS hackery when messing with fw_dir
|
|
fw_dir=${fw_dir//:/ }
|
|
|
|
-if [[ ! -f $logfile ]];then
|
|
- if [[ ! `touch $logfile > /dev/null 2>&1` ]];then
|
|
- printf "%s\n" "dracut: touch $logfile failed. Couldn't create logfile."
|
|
+# check for logfile and try to create one if it doesn't exist
|
|
+if [[ -n "$logfile" ]];then
|
|
+ if [[ ! -f "$logfile" ]];then
|
|
+ touch "$logfile"
|
|
+ if [ ! $? -eq 0 ] ;then
|
|
+ printf "%s\n" "dracut: touch $logfile failed." >&2
|
|
+ fi
|
|
fi
|
|
fi
|
|
|
|
--
|
|
1.7.6.1
|
|
|