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