From: Harald Hoyer Date: Tue, 29 Mar 2011 09:21:54 +0000 (+0200) Subject: dracut: simplify $kernel version argument setting X-Git-Tag: 010~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a5354a9a5264c67a84c4705c931c5f554d8d343;p=thirdparty%2Fdracut.git dracut: simplify $kernel version argument setting --- diff --git a/dracut b/dracut index c16b2221f..0a96c6675 100755 --- a/dracut +++ b/dracut @@ -187,7 +187,6 @@ push_arg() { fi } -kernel="unset" verbosity_mod_l=0 while (($# > 0)); do @@ -239,7 +238,7 @@ while (($# > 0)); do *) if ! [[ ${outfile+x} ]]; then outfile=$1 - elif [[ $kernel = "unset" ]]; then + elif ! [[ ${kernel+x} ]]; then kernel=$1 else usage; exit 1; @@ -248,7 +247,7 @@ while (($# > 0)); do esac shift done -if ! [[ $kernel ]] || [[ $kernel = "unset" ]]; then +if ! [[ $kernel ]]; then kernel=$(uname -r) fi [[ $outfile ]] || outfile="/boot/initramfs-$kernel.img"