Skip to content

Commit

Permalink
Merge pull request #181 from yast/branding_activating
Browse files Browse the repository at this point in the history
Branding activating
  • Loading branch information
jreidinger committed Oct 29, 2014
2 parents e8b426c + 6562fff commit 825d3ff
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Oct 29 07:16:22 UTC 2014 - jreidinger@suse.com

- fix branding activation on live CD and also with kexec enabled
(bnc#897847)
- 3.1.107

-------------------------------------------------------------------
Fri Oct 24 14:30:20 UTC 2014 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 3.1.106
Version: 3.1.107
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
41 changes: 20 additions & 21 deletions src/clients/bootloader_finish.rb
Expand Up @@ -167,6 +167,25 @@ def main
@retcode = Bootloader.WriteInstallation
else
@retcode = Bootloader.Update

# workaround for packages that forgot to update initrd(bnc#889616)
# do not use Initrd module as it can also change configuration, which we do not want
res = SCR.Execute(path(".target.bash_output"), "/sbin/mkinitrd")
Builtins.y2milestone("Regerate initrd with result #{res}")
end

# FIXME workaround grub2 need manual rerun of branding due to overwrite by
# pbl. see bnc#879686 and bnc#901003
if Bootloader.getLoaderType =~ /grub2/
prefix = Installation.destdir
branding_activator = Dir["#{prefix}/usr/share/grub2/themes/*/activate-theme"].first
if branding_activator
branding_activator = branding_activator[prefix.size..-1]
res = SCR.Execute(path(".target.bash_output"), branding_activator)
Builtins.y2milestone("Reactivate branding with #{branding_activator} and result #{res}")
res = SCR.Execute(path(".target.bash_output"), "/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg")
Builtins.y2milestone("Regenerating config for branding with result #{res}")
end
end

if @retcode
Expand All @@ -185,8 +204,7 @@ def main
# (bnc #381192) don't use it if kexec is used
# update calling onetime boot bnc #339024
if !@retcode
@bl = Bootloader.getLoaderType
return Bootloader.FlagOnetimeBoot(Bootloader.getDefaultSection)
@ret = Bootloader.FlagOnetimeBoot(Bootloader.getDefaultSection)
end
else
return @retcode
Expand All @@ -196,25 +214,6 @@ def main
@ret = nil
end

# FIXME workaround grub2 need manual rerun of branding due to overwrite by
# pbl. see bnc#879686 and bnc#901003
if Bootloader.getLoaderType =~ /grub2/
prefix = Installation.destdir
branding_activator = Dir["#{prefix}/usr/share/grub2/themes/*/activate-theme"].first
if branding_activator
branding_activator = branding_activator[prefix.size..-1]
res = SCR.Execute(path(".target.bash_output"), branding_activator)
Builtins.y2milestone("Reactivate branding with #{branding_activator} and result #{res}")
end
end
# workaround for packages that forgot to update initrd(bnc#889616)
# do not use Initrd module as it can also change configuration, which we do not want
if Mode.update
res = SCR.Execute(path(".target.bash_output"), "/sbin/mkinitrd")
Builtins.y2milestone("Regerate initrd with result #{res}")
end


Builtins.y2debug("ret=%1", @ret)
Builtins.y2milestone("bootloader_finish finished")
deep_copy(@ret)
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Bootloader.rb
Expand Up @@ -934,7 +934,7 @@ def CopyKernelInird
WFM.Execute(path(".local.mkdir"), "/var/lib/YaST2")

cmd = Builtins.sformat(
"/bin/cp -L %1%2 %1%3 %4",
"/bin/cp -L %1/%2 %1/%3 %4",
Installation.destdir,
"vmlinuz",
"initrd",
Expand Down

0 comments on commit 825d3ff

Please sign in to comment.