This commit is contained in:
parent
3c98f9ad3c
commit
ea3a8d6e90
@ -63,9 +63,9 @@ function update_bootloader()
|
||||
echo "bootloader_entry: This is (wrapper) function update_bootloader" >> $logname
|
||||
|
||||
[ -x /sbin/update-bootloader ] || return 0
|
||||
|
||||
# call update-bootloader and also append stderr to the log file
|
||||
((/sbin/update-bootloader "$@") 3>&1 1>&2 2>&3 3>&- | tee -a \
|
||||
$logname ) 3>&1 1>&2 2>&3 3>&-
|
||||
/sbin/update-bootloader "$@") 1>>$logname 2>&1
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d2d1f6602930c9015b92ed440ab1514c07f94301af1a0e59fe1d588fa7d90350
|
||||
size 54903
|
3
perl-Bootloader-0.4.72.tar.bz2
Normal file
3
perl-Bootloader-0.4.72.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d37a1f5d664c728baf965d01baf0a8911fbd434e7259db51cebc34683d578a5b
|
||||
size 55048
|
@ -1,105 +0,0 @@
|
||||
--- lib/Bootloader/Core/GRUB.pm
|
||||
+++ lib/Bootloader/Core/GRUB.pm
|
||||
@@ -481,12 +481,12 @@
|
||||
}
|
||||
|
||||
# resolve symlinks.....
|
||||
- my $cmd = "udevinfo -q name -n $dev";
|
||||
+ my $cmd = "udevadm info -q name -n $dev";
|
||||
if (my $resolved_link = qx{$cmd 2> /dev/null}) {
|
||||
chomp ($resolved_link);
|
||||
$dev = "/dev/" . $resolved_link;
|
||||
}
|
||||
- $self->l_milestone ("GRUB::GrubDev2UnixDev: udevinfo returned: $dev");
|
||||
+ $self->l_milestone ("GRUB::GrubDev2UnixDev: udevadm info returned: $dev");
|
||||
|
||||
if (defined ($partition)) {
|
||||
foreach my $dev_ref (@{$self->{"partitions"}}) {
|
||||
@@ -544,7 +544,7 @@
|
||||
# need to be changed here
|
||||
my $original = $dev;
|
||||
my $kernel_dev;
|
||||
- my $cmd = "udevinfo -q name -n $dev";
|
||||
+ my $cmd = "udevadm info -q name -n $dev";
|
||||
if ($kernel_dev = qx{$cmd 2> /dev/null}) {
|
||||
chomp $kernel_dev;
|
||||
$kernel_dev = "/dev/" . $kernel_dev;
|
||||
@@ -574,8 +574,8 @@
|
||||
}
|
||||
|
||||
# get the symbolic link from udev, it might be used in device.map
|
||||
- # udevinfo returns a space separated list of strings
|
||||
- $cmd = "udevinfo -q symlink -n $kernel_dev";
|
||||
+ # udevadm info returns a space separated list of strings
|
||||
+ $cmd = "udevadm info -q symlink -n $kernel_dev";
|
||||
|
||||
my @udev_links = split (/ /, qx{$cmd 2>/dev/null});
|
||||
|
||||
@@ -2249,7 +2249,7 @@
|
||||
|
||||
#FIXME: sf@ need handling for /dev/dm-X devices here
|
||||
if ($device !~ /mapper/) {
|
||||
- my $cmd = "udevinfo -q symlink -n $device";
|
||||
+ my $cmd = "udevadm info -q symlink -n $device";
|
||||
my @udev_links = split (/ /, qx{$cmd 2>/dev/null});
|
||||
|
||||
foreach $device (@udev_links) {
|
||||
--- lib/Bootloader/Tools.pm
|
||||
+++ lib/Bootloader/Tools.pm
|
||||
@@ -241,7 +241,7 @@
|
||||
$mounted = `mount /sys`;
|
||||
}
|
||||
# FIXME: maybe useless code
|
||||
- my $cmd = "udevinfo -q name -p /block/$udev";
|
||||
+ my $cmd = "udevadm info -q name -p /block/$udev";
|
||||
my $dev = qx{ $cmd 2>/dev/null };
|
||||
chomp ($dev);
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
$dev = "/dev/$dev";
|
||||
}
|
||||
|
||||
- # Fallback in case udevinfo fails
|
||||
+ # Fallback in case udevadm info fails
|
||||
else {
|
||||
|
||||
#If $udev consists of both device and partition - e.g. "sda/sda1" -
|
||||
@@ -654,7 +654,7 @@
|
||||
|
||||
=item
|
||||
C<< $majmin = Bootloader::Tools::Udev2MajMin($udev); >>
|
||||
-takes a udev device as reported from udevinfo
|
||||
+takes a udev device as reported from udevadm info
|
||||
returns a string containing major:minor
|
||||
|
||||
=cut
|
||||
@@ -663,7 +663,7 @@
|
||||
|
||||
my $udev_dev = shift;
|
||||
my $majmin;
|
||||
- my $cmd = "udevinfo -qpath -n $udev_dev";
|
||||
+ my $cmd = "udevadm info -qpath -n $udev_dev";
|
||||
|
||||
if (my $udev_path = qx{$cmd 2>/dev/null}){
|
||||
chomp ($udev_path);
|
||||
@@ -682,9 +682,9 @@
|
||||
|
||||
=item
|
||||
C<< $udev_dev = Bootloader::Tools::MajMin2Udev($majmin); >>
|
||||
-takes a string major:minor as reported from udevinfo
|
||||
+takes a string major:minor as reported from udevadm info
|
||||
returns a string containing the udev device as reported
|
||||
-by udevinfo
|
||||
+by udevadm info
|
||||
|
||||
=cut
|
||||
|
||||
@@ -741,7 +741,7 @@
|
||||
|
||||
=item
|
||||
C<< $dm_dev = Bootloader::Tools::DMDev2MajMin($majmin); >>
|
||||
-takes a string major:minor as reported from udevinfo
|
||||
+takes a string major:minor as reported from udevadm info
|
||||
returns a string containing the device as reported by
|
||||
dmsetup
|
||||
|
@ -1,7 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 24 23:02:14 CEST 2008 - ro@suse.de
|
||||
Fri Sep 26 16:23:39 CEST 2008 - jreidinger@suse.cz
|
||||
|
||||
- use udevadm info instead of udevinfo
|
||||
- add password generator for grub (bnc #407887)
|
||||
- fix handling boolean parameters in powerLILO( bnc #383287)
|
||||
- exit as soon as possible if user request skip updating bootloader
|
||||
(bnc #425501)
|
||||
- fix permission for directory with script for kernel-update
|
||||
- use udevadm info instead of udevinfo (patch by ro)
|
||||
- 0.4.72
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 19 15:46:10 CEST 2008 - jreidinger@suse.cz
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package perl-Bootloader (Version 0.4.71)
|
||||
# spec file for package perl-Bootloader (Version 0.4.72)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -19,8 +19,8 @@
|
||||
|
||||
|
||||
Name: perl-Bootloader
|
||||
Version: 0.4.71
|
||||
Release: 2
|
||||
Version: 0.4.72
|
||||
Release: 1
|
||||
Requires: perl-base = %{perl_version}
|
||||
Requires: e2fsprogs
|
||||
Recommends: perl-gettext
|
||||
@ -31,7 +31,6 @@ Summary: Library for Configuring Boot Loaders
|
||||
Source: perl-Bootloader-%{version}.tar.bz2
|
||||
Source1: update-bootloader
|
||||
Source2: bootloader_entry
|
||||
Patch: perl-Bootloader-udevadm.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#!BuildIgnore: mdadm e2fsprogs limal-bootloader
|
||||
|
||||
@ -50,7 +49,6 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch
|
||||
|
||||
%build
|
||||
touch Makefile.PL
|
||||
@ -62,7 +60,7 @@ make DESTDIR=$RPM_BUILD_ROOT install_vendor
|
||||
%perl_process_packlist
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||
install -m 755 %_sourcedir/update-bootloader $RPM_BUILD_ROOT/sbin
|
||||
install -d -m 711 $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
install -d -m 755 $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
|
||||
%files
|
||||
@ -76,8 +74,14 @@ install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
|
||||
/usr/lib/bootloader
|
||||
|
||||
%changelog
|
||||
* Thu Sep 25 2008 ro@suse.de
|
||||
- use udevadm info instead of udevinfo
|
||||
* Fri Sep 26 2008 jreidinger@suse.cz
|
||||
- add password generator for grub (bnc #407887)
|
||||
- fix handling boolean parameters in powerLILO( bnc #383287)
|
||||
- exit as soon as possible if user request skip updating bootloader
|
||||
(bnc #425501)
|
||||
- fix permission for directory with script for kernel-update
|
||||
- use udevadm info instead of udevinfo (patch by ro)
|
||||
- 0.4.72
|
||||
* Fri Sep 19 2008 jreidinger@suse.cz
|
||||
- doesn't allow change between default and xen kernel during
|
||||
install (bnc #397075)
|
||||
|
@ -210,6 +210,15 @@ pod2usage("Option 'default' is only allowed for operation 'add'")
|
||||
pod2usage("Option 'force-default' is only allowed for operation 'add'")
|
||||
if ($opt_force_default and not defined $oper{add});
|
||||
|
||||
if (Bootloader::Tools::GetBootloader() eq "none")
|
||||
{
|
||||
open (LOG, ">>$logname");
|
||||
print LOG ("none bootloader, skipped updating \n");
|
||||
close LOG;
|
||||
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($opt_image and $opt_image !~ m;^/;) {
|
||||
$opt_image = getcwd . '/' . $opt_image
|
||||
}
|
||||
@ -500,7 +509,8 @@ if (defined $oper{remove}) {
|
||||
}
|
||||
|
||||
if (defined $oper{refresh}) {
|
||||
UpdateBootloader();
|
||||
my $ret = UpdateBootloader();
|
||||
exit 1 if ( !$ret );
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user