OBS User unknown 2008-10-06 17:04:19 +00:00 committed by Git OBS Bridge
parent 5eb6be0c3b
commit 10674efb2f
4 changed files with 29 additions and 5 deletions

View File

@ -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;

View File

@ -55,9 +55,6 @@ Options
*-D* | *--debug*::
Prints debugging output.
*-o* _options_ | *--options* _options_::
Specify additional _options_ passed to *kexec*(8).
Return Value
------------

View File

@ -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

View File

@ -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