diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-03-05 06:12:56 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-03-05 06:12:56 +0000 |
commit | 2ea1b1ba7cede21669f2e85d34cdd01525f74e01 (patch) | |
tree | 17d78d6061fc81b65fd095c15e9e4ccbc3994d82 | |
parent | 8c8c6d8d23f48887896e727dde2a4e77e481724e (diff) | |
download | bootloader-utils-2ea1b1ba7cede21669f2e85d34cdd01525f74e01.tar bootloader-utils-2ea1b1ba7cede21669f2e85d34cdd01525f74e01.tar.gz bootloader-utils-2ea1b1ba7cede21669f2e85d34cdd01525f74e01.tar.bz2 bootloader-utils-2ea1b1ba7cede21669f2e85d34cdd01525f74e01.tar.xz bootloader-utils-2ea1b1ba7cede21669f2e85d34cdd01525f74e01.zip |
perl_checker cleanups
-rw-r--r-- | rebootin | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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 <label> is one of " . join(", ", @entries) . "\n" : ''; die <<'EOF' . $entries; usage: rebootin -l @@ -119,6 +119,6 @@ usage: rebootin -l EOF } -sub write_fast_boot { +sub write_fast_boot() { open(my $_F, ">/fastboot"); } |