Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
dracut.1458
0146-dracut.sh-corrected-logfile-check.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0146-dracut.sh-corrected-logfile-check.patch of Package dracut.1458
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(-) Index: dracut-037/dracut.sh =================================================================== --- dracut-037.orig/dracut.sh +++ dracut-037/dracut.sh @@ -813,9 +813,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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor