summaryrefslogtreecommitdiffstats
path: root/perl-install/bootsplash.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-22 03:10:54 -0400
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-01-02 14:57:52 +0100
commite1a1d3d2e14a141ff17ab5c550eb966092a19aa9 (patch)
treebbbfc9dbf4ed53034032b3563c3b87e49c40a13b /perl-install/bootsplash.pm
parent52a339833b6189e59572ead48cf151ac655ffb21 (diff)
downloaddrakx-e1a1d3d2e14a141ff17ab5c550eb966092a19aa9.tar
drakx-e1a1d3d2e14a141ff17ab5c550eb966092a19aa9.tar.gz
drakx-e1a1d3d2e14a141ff17ab5c550eb966092a19aa9.tar.bz2
drakx-e1a1d3d2e14a141ff17ab5c550eb966092a19aa9.tar.xz
drakx-e1a1d3d2e14a141ff17ab5c550eb966092a19aa9.zip
drop remaining unused splash bits
should have been done in commit 5a382f9b0c1fac53338afd7ddd2478a6e36f03e3
Diffstat (limited to 'perl-install/bootsplash.pm')
-rw-r--r--perl-install/bootsplash.pm85
1 files changed, 0 insertions, 85 deletions
diff --git a/perl-install/bootsplash.pm b/perl-install/bootsplash.pm
deleted file mode 100644
index 5539c0b98..000000000
--- a/perl-install/bootsplash.pm
+++ /dev/null
@@ -1,85 +0,0 @@
-package bootsplash;
-
-use common;
-use Xconfig::resolution_and_depth;
-
-
-my $themes_dir = "/usr/share/bootsplash/themes";
-my $themes_config_dir = "/etc/bootsplash/themes";
-my $sysconfig_file = "/etc/sysconfig/bootsplash";
-my $bootsplash_scripts = "/usr/share/bootsplash/scripts";
-my $default_theme = 'Mageialinux';
-our $default_thumbnail = '/usr/share/libDrakX/pixmaps/nosplash_thumb.png';
-our @resolutions = uniq(map { "$_->{X}x$_->{Y}" } Xconfig::resolution_and_depth::bios_vga_modes());
-
-sub get_framebuffer_resolution() {
- require bootloader;
- require fsedit;
- my $all_hds = fsedit::get_hds();
- fs::get_info_from_fstab($all_hds);
- my $bootloader = bootloader::read($all_hds);
- my $x_res = Xconfig::resolution_and_depth::from_bios($bootloader->{default_options}{vga});
- $x_res ?
- ($x_res->{X} . 'x' . $x_res->{Y}, 1) :
- (first(@resolutions), 0);
-}
-
-sub themes_read_sysconfig {
- my ($res) = @_;
- my %theme = (
- name => $default_theme,
- enabled => 1,
- );
- if (-r $::prefix . $sysconfig_file) {
- local $_;
- foreach (cat_($::prefix . $sysconfig_file)) {
- /^SPLASH=no/ and $theme{enabled} = 0;
- /^THEME=(.*)/ && -f theme_get_image_for_resolution($1, $res) and $theme{name} = $1;
- }
- }
- \%theme;
-}
-
-sub theme_get_image_for_resolution {
- my ($theme, $res) = @_;
- $::prefix . $themes_dir . '/' . $theme . '/images/bootsplash-' . $res . ".jpg";
-}
-
-sub theme_get_config_for_resolution {
- my ($theme, $res) = @_;
- $::prefix . $themes_config_dir . '/' . $theme . '/config/bootsplash-' . $res . ".cfg";
-}
-
-sub theme_exists_for_resolution {
- my ($theme, $res) = @_;
- -f theme_get_image_for_resolution($theme, $res) && -f theme_get_config_for_resolution($theme, $res);
-}
-
-sub themes_list() {
- grep { !/^\./ && -d $::prefix . $themes_dir . '/' . $_ } sort(all($::prefix . $themes_dir));
-}
-
-sub themes_list_for_resolution {
- my ($res) = @_;
- grep { theme_exists_for_resolution($_, $res) } themes_list();
-}
-
-sub switch {
- my ($theme) = @_;
- if ($::testing) {
- print "enabling bootsplash theme $theme\n";
- } else {
- #- theme scripts will update SPLASH value in sysconfig file
- system($::prefix . $bootsplash_scripts . '/switch-themes', $theme);
- }
-}
-
-sub remove() {
- if ($::testing) {
- print "disabling bootsplash theme\n";
- } else {
- system($::prefix . $bootsplash_scripts . '/remove-theme');
- }
-}
-
-1;