summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rebootin14
1 files 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 <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");
}