aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2003-02-26 02:37:24 +0000
committerBill Nottingham <notting@redhat.com>2003-02-26 02:37:24 +0000
commit01e080020dbcbf98fdb6505b9b7f54ee43695a78 (patch)
tree928e0c0e7b5a33c1753990fa502e28b6dc15c71e
parent8c679537256a0642c5ea4e634757629eae39261d (diff)
downloadinitscripts-01e080020dbcbf98fdb6505b9b7f54ee43695a78.tar
initscripts-01e080020dbcbf98fdb6505b9b7f54ee43695a78.tar.gz
initscripts-01e080020dbcbf98fdb6505b9b7f54ee43695a78.tar.bz2
initscripts-01e080020dbcbf98fdb6505b9b7f54ee43695a78.tar.xz
initscripts-01e080020dbcbf98fdb6505b9b7f54ee43695a78.zip
handle 7.x sysfontacm settings on the fly (#84183)
-rwxr-xr-xsetsysfont3
1 files changed, 3 insertions, 0 deletions
diff --git a/setsysfont b/setsysfont
index a21bc373..eac0e31c 100755
--- a/setsysfont
+++ b/setsysfont
@@ -28,6 +28,9 @@ elif [ -x /bin/setfont ]; then
ARGS="-u $UNIMAP"
fi
if [ -n "$SYSFONTACM" ]; then
+ if [ ! -f /lib/kbd/consoletrans/$SYSONTACM_to_uni.trans ]; then
+ SYSFONTACM=`echo $SYSFONTACM | sed "|iso0|8859-|g"`
+ fi
ARGS="$ARGS -m $SYSFONTACM"
fi
if [ -n "$SYSFONT" ]; then
opt">; 1; sub read($$$) { my ($fs, $pos, $size) = @_; my $buf = "\0" x $size; sysseek $fs->{fd}, $pos, 0 or die "seeking to byte #$pos failed on device $fs->{fs_name}"; sysread $fs->{fd}, $buf, $size or die "reading at byte #$pos failed on device $fs->{fs_name}"; $buf; } sub write($$$$) { my ($fs, $pos, $_size, $buf) = @_; sysseek $fs->{fd}, $pos, 0 or die "seeking to byte #$pos failed on device $fs->{fs_name}"; syswrite $fs->{fd}, $buf or die "writing at byte #$pos failed on device $fs->{fs_name}"; } sub read_cluster($$) { my ($fs, $cluster) = @_; my $buf; my $pos = $fs->{cluster_offset} / 512 + $cluster * ($fs->{cluster_size} / 512); c::lseek_sector(fileno $fs->{fd}, $pos, 0) or die "seeking to sector #$pos failed on device $fs->{fs_name}"; sysread $fs->{fd}, $buf, $fs->{cluster_size} or die "reading at sector #$pos failed on device $fs->{fs_name}"; $buf; } sub write_cluster($$$) { my ($fs, $cluster, $buf) = @_; my $pos = $fs->{cluster_offset} / 512 + $cluster * ($fs->{cluster_size} / 512); c::lseek_sector(fileno $fs->{fd}, $pos, 0) or die "seeking to sector #$pos failed on device $fs->{fs_name}"; syswrite $fs->{fd}, $buf or die "writing at sector #$pos failed on device $fs->{fs_name}"; } sub read_file($$) { my ($fs, $cluster) = @_; my $buf = ''; for (; !resize_fat::fat::is_eof($cluster); $cluster = resize_fat::fat::next($fs, $cluster)) { $cluster == 0 and die "Bad FAT: unterminated chain\n"; $buf .= read_cluster($fs, $cluster); } $buf; } sub check_mounted($) { my ($f) = @_; local *F; open F, "/proc/mounts" or die "error opening /proc/mounts\n"; foreach (<F>) { /^$f\s/ and die "device is mounted"; } } sub open { my ($fs) = @_; check_mounted($fs->{device}); sysopen $fs->{fd}, $fs->{fs_name}, 2 or sysopen $fs->{fd}, $fs->{fs_name}, 0 or die "error opening device $fs->{fs_name} for writing\n"; }