Blame SOURCES/0211-Make-logfile-configurable.patch

a56a5e
From 81a6e87f0f183c1ddf8808bb52be09e3070caefd Mon Sep 17 00:00:00 2001
a56a5e
From: Hannes Reinecke <hare@suse.de>
a56a5e
Date: Fri, 29 Nov 2013 13:13:49 +0100
a56a5e
Subject: [PATCH] Make logfile configurable
a56a5e
a56a5e
Add '--logfile' option to make the log file configurable during
a56a5e
runtime.
a56a5e
a56a5e
Signed-off-by: Hannes Reinecke <hare@suse.de>
a56a5e
(cherry picked from commit ee54b8404c10e29e5bddb633a4c7becb7acb0632)
a56a5e
---
a56a5e
 dracut.8.asc | 6 ++++++
a56a5e
 dracut.sh    | 4 ++++
a56a5e
 2 files changed, 10 insertions(+)
a56a5e
a56a5e
diff --git a/dracut.8.asc b/dracut.8.asc
a56a5e
index f97074a..14ce26b 100644
a56a5e
--- a/dracut.8.asc
a56a5e
+++ b/dracut.8.asc
a56a5e
@@ -275,6 +275,12 @@ Default:
a56a5e
 
a56a5e
 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
a56a5e
 
a56a5e
+**--logfile** _<logfile>_:: logfile to use; overrides any setting from
a56a5e
+    the configuration files.
a56a5e
++
a56a5e
+Default:
a56a5e
+    _/var/log/dracut.log_
a56a5e
+
a56a5e
 **-l, --local**::
a56a5e
     activates the local mode. dracut will use modules from the current working
a56a5e
     directory instead of the system-wide installed modules in
a56a5e
diff --git a/dracut.sh b/dracut.sh
a56a5e
index f560dd1..8e5e86f 100755
a56a5e
--- a/dracut.sh
a56a5e
+++ b/dracut.sh
a56a5e
@@ -187,6 +187,7 @@ Creates initial ramdisk images for preloading modules
a56a5e
   --keep                Keep the temporary initramfs for debugging purposes
a56a5e
   --printsize           Print out the module install size
a56a5e
   --sshkey [SSHKEY]     Add ssh key to initramfs (use with ssh-client module)
a56a5e
+  --logfile [FILE]      Logfile to use (overrides configuration setting)
a56a5e
 
a56a5e
 If [LIST] has multiple arguments, then you have to put these in quotes.
a56a5e
 
a56a5e
@@ -340,6 +341,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \
a56a5e
     --long debug \
a56a5e
     --long profile \
a56a5e
     --long sshkey: \
a56a5e
+    --long logfile: \
a56a5e
     --long verbose \
a56a5e
     --long quiet \
a56a5e
     --long local \
a56a5e
@@ -430,6 +432,7 @@ while :; do
a56a5e
         --debug)       debug="yes";;
a56a5e
         --profile)     profile="yes";;
a56a5e
         --sshkey)      sshkey="$2"; shift;;
a56a5e
+        --logfile)     logfile_l="$2"; shift;;
a56a5e
         -v|--verbose)  ((verbosity_mod_l++));;
a56a5e
         -q|--quiet)    ((verbosity_mod_l--));;
a56a5e
         -l|--local)
a56a5e
@@ -709,6 +712,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
a56a5e
 [[ $ro_mnt_l ]] && ro_mnt="yes"
a56a5e
 [[ $early_microcode_l ]] && early_microcode=$early_microcode_l
a56a5e
 [[ $early_microcode ]] || early_microcode=no
a56a5e
+[[ $logfile_l ]] && logfile="$logfile_l"
a56a5e
 # eliminate IFS hackery when messing with fw_dir
a56a5e
 fw_dir=${fw_dir//:/ }
a56a5e