Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:seife:linktest
grub2-branding-simple
activate-theme
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File activate-theme of Package grub2-branding-simple
#! /usr/bin/perl # adopted from the openSUSE branding file sub update_default; $theme = "simple"; $grub2_default = "/etc/default/grub"; update_default; sub update_default { # skip if there's no grub2 config return unless -f $grub2_default; open $f, '<', $grub2_default; my @f = (<$f>); close $f; $term = "GRUB_TERMINAL=console\n"; # modify existing entry, or... for (@f) { if(/^\s*#?\s*GRUB_TERMINAL\s*=/) { $_ = $term; $ok = 1; } } # ... add a new entry push @f, $term if !$ok; open $f, '>', "$grub2_default.tmp"; print $f @f; close $f; rename $grub2_default, "$grub2_default.old"; rename "$grub2_default.tmp", $grub2_default; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor