forked from pool/kexec-tools
This commit is contained in:
parent
5eb6be0c3b
commit
10674efb2f
@ -25,6 +25,7 @@ use constant TRUE => 1;
|
|||||||
my $GRUBDIR = "/boot/grub";
|
my $GRUBDIR = "/boot/grub";
|
||||||
my $GRUBDEFAULT = "$GRUBDIR/default";
|
my $GRUBDEFAULT = "$GRUBDIR/default";
|
||||||
my $debug = FALSE;
|
my $debug = FALSE;
|
||||||
|
my $showHelp = FALSE;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Prints the given stuff (variable number of arguments) if debugging has
|
# 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
|
# 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.
|
# or the /boot/grub/default file is not readable, then -1 is returned.
|
||||||
@ -78,12 +91,17 @@ sub get_grubonce() # {{{
|
|||||||
sub parse_options() # {{{
|
sub parse_options() # {{{
|
||||||
{
|
{
|
||||||
GetOptions(
|
GetOptions(
|
||||||
"D|debug" => \$debug
|
"D|debug" => \$debug,
|
||||||
|
"h|help" => \$showHelp
|
||||||
);
|
);
|
||||||
} # }}}
|
} # }}}
|
||||||
|
|
||||||
|
|
||||||
parse_options();
|
parse_options();
|
||||||
|
if ($showHelp) {
|
||||||
|
show_help();
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
Bootloader::Tools::InitLibrary();
|
Bootloader::Tools::InitLibrary();
|
||||||
my $loader = Bootloader::Tools::GetBootloader();
|
my $loader = Bootloader::Tools::GetBootloader();
|
||||||
my $default = -1;
|
my $default = -1;
|
||||||
|
@ -56,9 +56,6 @@ Options
|
|||||||
*-D* | *--debug*::
|
*-D* | *--debug*::
|
||||||
Prints debugging output.
|
Prints debugging output.
|
||||||
|
|
||||||
*-o* _options_ | *--options* _options_::
|
|
||||||
Specify additional _options_ passed to *kexec*(8).
|
|
||||||
|
|
||||||
Return Value
|
Return Value
|
||||||
------------
|
------------
|
||||||
The program returns *0* on success and *1* on failure.
|
The program returns *0* on success and *1* on failure.
|
||||||
|
@ -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
|
Wed Aug 27 11:59:55 CEST 2008 - bwalle@suse.de
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: Tools for fast kernel loading
|
Summary: Tools for fast kernel loading
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 24
|
Release: 36
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Source1: kexec-bootloader
|
Source1: kexec-bootloader
|
||||||
Source2: kexec-bootloader.8.txt
|
Source2: kexec-bootloader.8.txt
|
||||||
@ -126,6 +126,9 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Aug 27 2008 bwalle@suse.de
|
||||||
- only install and build /etc/init.d/kexec with openSUSE 11.1 /
|
- only install and build /etc/init.d/kexec with openSUSE 11.1 /
|
||||||
SLES 11 and later
|
SLES 11 and later
|
||||||
|
Loading…
Reference in New Issue
Block a user