]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Simplify config name determination
authorMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 19 Oct 2013 13:34:13 +0000 (15:34 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 19 Oct 2013 13:34:13 +0000 (15:34 +0200)
novaboot

index 5ef01bf2ea77c429f8ccc9f528942b95b4bceb2e..1198710d6095dc3c67a11907e596133080259b86 100755 (executable)
--- a/novaboot
+++ b/novaboot
@@ -477,11 +477,8 @@ foreach my $script (@scripts) {
     $variables = $$script{variables};
     my ($server_grub_prefix);
 
-    if (defined $config_name_opt) {
-       $config_name = $config_name_opt;
-    } else {
-       ($config_name = $filename) =~ s#.*/##;
-    }
+    ($config_name = $filename) =~ s#.*/##;
+    $config_name = $config_name_opt if (defined $config_name_opt);
 
     my $kernel;
     if (exists $variables->{KERNEL}) {