dracut/0010-Make-logfile-configurable.patch
Raymond Wooninck c0e1df1a13 Accepting request 208892 from home:hreinecke:branches:Base:System
- Update with patches from git repository:
   * kernel-modules: add ohci-pci to the list of forced module installs
   * Run 'xz' and 'lzma' with multiple threads
   * systemd: do not exit the initqueue, if systemd asks a password
   * iscsi,nbd: do not fail in hostonly mode
   * dracut-functions.sh: Avoid loading unnecessary 32-bit libraries
     for 64-bit initrds
   * fips: also install /etc/system-fips in the initramfs
   * dracut.modules.7.asc: removed empty section
   * dracut.sh: fixed PATH shortener
   * dracut.spec: move /sbin/dracut to /usr/sbin/dracut
   * iscsi/nbd: do not try to mount the whole disk, if root= is missing
   * fips: include crct10dif_generic
   * Handle crypto modules with and without modaliases
   * usrmount/module-setup.sh: fixed typo
   * lvm: always install thin utils for lvm
   * kernel-modules(ARM): add mmc_block usb_storage to static list of
     kernel mods
   * dracut-functions.sh:check_block_and_slaves*() skip LVM internal devs
   * mkdir basic dirs in /run
   * network/fcoe: only redirect output to loginit.pipe, if exists
   * dracut.sh: no need to make subdirs in run
   * dracut.sh: also mkdir /run/lock, which is copied to
   * lvm: fix thin recognition
   * Add lzo, lz4 compression and read INITRD_COMPRESS
   * remove resume-genrules.sh
   * resume: fix swap detection in hostonly
   * base/init.sh: also mkdir /run/lock
   * dmsquash-live: add /dev/mapper/live-base
   * Doc: cleanup, extend and split and reuse

OBS-URL: https://build.opensuse.org/request/show/208892
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=82
2013-11-29 12:27:47 +00:00

71 lines
2.3 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From bd9556ea50348e21d59e022433df05fe35ddfc14 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 28 Nov 2013 13:21:30 +0100
Subject: [PATCH] Make logfile configurable
Add '--logfile' option to make the log file configurable during
runtime.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
dracut.8.asc | 6 ++++++
dracut.sh | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/dracut.8.asc b/dracut.8.asc
index 2ea6744..d381dcf 100644
--- a/dracut.8.asc
+++ b/dracut.8.asc
@@ -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
diff --git a/dracut.sh b/dracut.sh
index bce2662..5f63d94 100755
--- 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//:/ }
--
1.8.1.4