]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: simplify $kernel version argument setting
authorHarald Hoyer <harald@redhat.com>
Tue, 29 Mar 2011 09:21:54 +0000 (11:21 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Mar 2011 09:21:54 +0000 (11:21 +0200)
dracut

diff --git a/dracut b/dracut
index c16b2221f2d6da8ff153ac2f15d8f6e8d6ab982a..0a96c66750034ebb4b1f71070ab2402cb22415dc 100755 (executable)
--- 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"