]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Make logfile configurable
authorHannes Reinecke <hare@suse.de>
Fri, 29 Nov 2013 12:13:49 +0000 (13:13 +0100)
committerHarald Hoyer <harald@redhat.com>
Thu, 5 Dec 2013 14:13:29 +0000 (15:13 +0100)
Add '--logfile' option to make the log file configurable during
runtime.

Signed-off-by: Hannes Reinecke <hare@suse.de>
dracut.8.asc
dracut.sh

index 2ea6744712512699228073e336e6ed143bdc7a61..d381dcfe0a4582d3e70f06e101d5694dc0cd26a3 100644 (file)
@@ -275,6 +275,12 @@ Default:
 
 **--sshkey** _<sshkey file>_:: ssh key file used with ssh-client module.
 
+**--logfile** _<logfile>_:: logfile to use; overrides any setting from
+    the configuration files.
++
+Default:
+    _/var/log/dracut.log_
+
 **-l, --local**::
     activates the local mode. dracut will use modules from the current working
     directory instead of the system-wide installed modules in
index 5709874d2ee00c16105e1c656cc03fcf601bd60e..11dcd0e5312253b5881a468fe93cd43630e33f79 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -183,6 +183,7 @@ Creates initial ramdisk images for preloading modules
   --keep                Keep the temporary initramfs for debugging purposes
   --printsize           Print out the module install size
   --sshkey [SSHKEY]     Add ssh key to initramfs (use with ssh-client module)
+  --logfile [FILE]      Logfile to use (overrides configuration setting)
 
 If [LIST] has multiple arguments, then you have to put these in quotes.
 
@@ -335,6 +336,7 @@ TEMP=$(unset POSIXLY_CORRECT; getopt \
     --long debug \
     --long profile \
     --long sshkey: \
+    --long logfile: \
     --long verbose \
     --long quiet \
     --long local \
@@ -418,6 +420,7 @@ while :; do
         --debug)       debug="yes";;
         --profile)     profile="yes";;
         --sshkey)      sshkey="$2"; shift;;
+        --logfile)     logfile_l="$2"; shift;;
         -v|--verbose)  ((verbosity_mod_l++));;
         -q|--quiet)    ((verbosity_mod_l--));;
         -l|--local)
@@ -690,6 +693,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
 [[ $ro_mnt_l ]] && ro_mnt="yes"
 [[ $early_microcode_l ]] && early_microcode=$early_microcode_l
 [[ $early_microcode ]] || early_microcode=no
+[[ $logfile_l ]] && logfile="$logfile_l"
 # eliminate IFS hackery when messing with fw_dir
 fw_dir=${fw_dir//:/ }