From 2ea1b1ba7cede21669f2e85d34cdd01525f74e01 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Mar 2013 06:12:56 +0000 Subject: perl_checker cleanups --- rebootin | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rebootin b/rebootin index b4c074e..9222bfb 100644 --- a/rebootin +++ b/rebootin @@ -53,10 +53,10 @@ if ($bootloader =~ /GRUB/) { exec "reboot" unless $noreboot; -sub list_entries { print "$_\n" foreach @entries; exit(0) } -sub select_entry { +sub list_entries() { print "$_\n" foreach @entries; exit(0) } +sub select_entry() { my $i = 1; - print $i++.") $_\n" foreach @entries; + print $i++ . ") $_\n" foreach @entries; print "0) exit\n"; my $userinput; do { @@ -68,7 +68,7 @@ sub select_entry { $entries[$userinput-1]; } -sub lilo_conf { +sub lilo_conf() { open(my $F, $lilo_conf) or die "lilo is not installed ($lilo_conf is missing)\n"; @entries = map { /="?([^"\n]+)/ } grep { /\s*label=\S*/ } <$F>; list_entries() if $list; @@ -79,7 +79,7 @@ sub lilo_conf { system("lilo -R $wanted_entry"); die "error while wanting to reboot on $wanted_entry\n" if $?; } -sub grub_conf { +sub grub_conf() { open(my $F, $grub_menu) or die "grub is not installed ($grub_menu is missing)\n"; my @short_entries; foreach (<$F>) { @@ -110,7 +110,7 @@ sub set_grub { write_fast_boot() if $fastboot; } -sub usage { +sub usage() { my $entries = @entries ? " where