diff options
-rwxr-xr-x | scripts/detect-resolution | 20 | ||||
-rw-r--r-- | scripts/remove-theme | 8 | ||||
-rwxr-xr-x | scripts/switch-themes | 1 |
3 files changed, 9 insertions, 20 deletions
diff --git a/scripts/detect-resolution b/scripts/detect-resolution index 0f96b9d..7087665 100755 --- a/scripts/detect-resolution +++ b/scripts/detect-resolution @@ -79,10 +79,10 @@ sub parse_lilo_conf { open F, $lilo_conf or die "Can't open $lilo_conf\n"; while (<F>) { next if /^\s*#/; - $main{default} = $1 if m/^default=(.*)/; + $main{default} = remove_quotes($1) if m/^default=(.*)/; $main{vga} = $1 if m/^vga=(.*)/; $vga = $1 if /vga=(.*)/; - $label = $1 if /label=(.*)/; + $label = remove_quotes($1) if /label=(.*)/; $loc_initrd = $1 if m,initrd=(?:.*/)?(.*),; $entry{$label}{vga} = $vga if ($label && $vga); if (/image/) { @@ -108,35 +108,20 @@ sub convert_vgamode { my $v; #From drakx Xconfigurator_consts.pm my %vgamodes = ( - '640xx8' => [ '769', '0x301' ], '640x480x8' => [ '769', '0x301' ], - '800xx8' => [ '771', '0x303' ], '800x600x8' => [ '771', '0x303' ], - '1024xx8' => [ '773', '0x305' ], '1024x768x8' => [ '773', '0x305' ], - '1280xx8' => [ '775', '0x307' ], '1280x1024x8' => [ '775', '0x307' ], - '1600xx8' => [ '777', '0x309' ], '1600x1200x8' => [ '777', '0x309' ], - '640xx15' => [ '784', '0x310' ], '640x480x15' => [ '784', '0x310' ], - '800xx15' => [ '787', '0x313' ], '800x600x15' => [ '787', '0x313' ], - '1024xx15' => [ '790', '0x316' ], '1024x768x15' => [ '790', '0x316' ], - '1280xx15' => [ '793', '0x319' ], '1280x1024x15' => [ '793', '0x319' ], - '1600xx15' => [ '796', '0x31C' ], '1600x1200x15' => [ '796', '0x31C' ], - '640xx16' => [ '785', '0x311' ], '640x480x16' => [ '785', '0x311' ], - '800xx16' => [ '788', '0x314' ], '800x600x16' => [ '788', '0x314' ], - '1024xx16' => [ '791', '0x317' ], '1024x768x16' => [ '791', '0x317' ], - '1280xx16' => [ '794', '0x31A' ], '1280x1024x16' => [ '794', '0x31A' ], - '1600xx16' => [ '797', '0x31D' ], '1600x1200x16' => [ '797', '0x31D' ], #- '640xx24' => 786, #- there is a problem with these resolutions since the BIOS may take 24 or 32 planes. #- '640x480x24' => 786, @@ -151,3 +136,4 @@ sub convert_vgamode { undef $vga if not $v;return $v; } sub cat_ { local *F; open F, $_[0] or $_[1] ? die "cat of file $_[0] failed: $!\n" : return; my @l = <F>; wantarray ? @l : join '', @l } +sub remove_quotes { local $_ = $_[0]; s/^"(.*)"$/$1/g; s/\\"/"/g; $_ } diff --git a/scripts/remove-theme b/scripts/remove-theme index 14636c1..f7b8dde 100644 --- a/scripts/remove-theme +++ b/scripts/remove-theme @@ -12,7 +12,11 @@ function remove_theme () { cp -f $sysconfig $tmpfile && rm -f $sysconfig ok= while read line;do - if [[ $line == THEME=* ]];then + if [[ $line == SPLASH=* ]];then + echo "SPLASH=no" >> $sysconfig + continue; + fi + if [[ $line == THEME=* ]];then echo "THEME=" >> $sysconfig ok=yes continue; @@ -20,7 +24,7 @@ function remove_theme () { echo $line >> $sysconfig done < $tmpfile if [[ -z $ok ]];then - echo "THEME=$toswitch" >> $sysconfig + echo "THEME=" >> $sysconfig fi rm -f $tmpfile rm -f /etc/bootsplash/current diff --git a/scripts/switch-themes b/scripts/switch-themes index bec851a..7101954 100755 --- a/scripts/switch-themes +++ b/scripts/switch-themes @@ -87,7 +87,6 @@ function switch_theme () { while read line;do if [[ $line == SPLASH=* ]];then echo "SPLASH=auto" >> $sysconfig - ok=yes continue; fi if [[ $line == THEME=* ]];then |