From 10674efb2faac65a287e189ead79638f9467d56405da49624e81707ecaaa913f Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 6 Oct 2008 17:04:19 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kexec-tools?expand=0&rev=54 --- kexec-bootloader | 20 +++++++++++++++++++- kexec-bootloader.8.txt | 3 --- kexec-tools.changes | 6 ++++++ kexec-tools.spec | 5 ++++- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/kexec-bootloader b/kexec-bootloader index 937fa33..80909a6 100644 --- a/kexec-bootloader +++ b/kexec-bootloader @@ -25,6 +25,7 @@ use constant TRUE => 1; my $GRUBDIR = "/boot/grub"; my $GRUBDEFAULT = "$GRUBDIR/default"; my $debug = FALSE; +my $showHelp = FALSE; # # Prints the given stuff (variable number of arguments) if debugging has @@ -37,6 +38,18 @@ sub print_debug(@) # {{{ } } # }}} +# +# Displays help. Does not exit. +sub show_help() +{ + print STDERR "kexec-bootloader\n"; + print STDERR "Loads kexec kernel from bootloader configuration.\n\n"; + print STDERR "Options:\n"; + print STDERR " -h | --help Shows that help message.\n"; + print STDERR " -D | --debug Prints debugging information.\n"; +} + + # # Returns the value stored with "grubonce". If no value has been stored # or the /boot/grub/default file is not readable, then -1 is returned. @@ -78,12 +91,17 @@ sub get_grubonce() # {{{ sub parse_options() # {{{ { GetOptions( - "D|debug" => \$debug + "D|debug" => \$debug, + "h|help" => \$showHelp ); } # }}} parse_options(); +if ($showHelp) { + show_help(); + exit(0); +} Bootloader::Tools::InitLibrary(); my $loader = Bootloader::Tools::GetBootloader(); my $default = -1; diff --git a/kexec-bootloader.8.txt b/kexec-bootloader.8.txt index 1276169..6eedf67 100644 --- a/kexec-bootloader.8.txt +++ b/kexec-bootloader.8.txt @@ -55,9 +55,6 @@ Options *-D* | *--debug*:: Prints debugging output. - -*-o* _options_ | *--options* _options_:: - Specify additional _options_ passed to *kexec*(8). Return Value ------------ diff --git a/kexec-tools.changes b/kexec-tools.changes index 3bedfdc..d8a1c84 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Oct 06 17:32:56 CEST 2008 - bwalle@suse.de + +- Implement -h (help) option (bnc#432386). +- Remove documentation of -o (options) option that never existed. + ------------------------------------------------------------------- Wed Aug 27 11:59:55 CEST 2008 - bwalle@suse.de diff --git a/kexec-tools.spec b/kexec-tools.spec index 2de9a86..1f5b456 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Tools for fast kernel loading Version: 2.0.0 -Release: 24 +Release: 36 Source: %{name}-%{version}.tar.bz2 Source1: kexec-bootloader Source2: kexec-bootloader.8.txt @@ -126,6 +126,9 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec %endif %changelog +* Mon Oct 06 2008 bwalle@suse.de +- Implement -h (help) option (bnc#432386). +- Remove documentation of -o (options) option that never existed. * Wed Aug 27 2008 bwalle@suse.de - only install and build /etc/init.d/kexec with openSUSE 11.1 / SLES 11 and later