public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, sh/
Date: Sun, 17 Feb 2013 02:49:13 +0000 (UTC)	[thread overview]
Message-ID: <1361065875.746bf5f78376e2e7b3e8bc843dfa1e4a3fa6a8e4.WilliamH@OpenRC> (raw)

commit:     746bf5f78376e2e7b3e8bc843dfa1e4a3fa6a8e4
Author:     Andrew Gregory <andrew.gregory.8 <AT> gmail <DOT> com>
AuthorDate: Tue Feb 12 03:13:27 2013 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Feb 17 01:51:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=746bf5f7

consolefont: use setfont to save the current font

Using setfont directly to save the font prevents breakage
when a distro stores consolefonts in a location other than
/usr/share/consolefonts such as Arch which stores them in
/usr/share/kbd/consolefonts

Signed-off-by: Andrew Gregory <andrew.gregory.8 <AT> gmail.com>

---
 init.d/consolefont.in     |    8 ++------
 sh/init-early.sh.Linux.in |    3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/init.d/consolefont.in b/init.d/consolefont.in
index 66b780d..0e91d13 100644
--- a/init.d/consolefont.in
+++ b/init.d/consolefont.in
@@ -53,14 +53,10 @@ start()
 	done
 	eend $retval
 
-	# Store the last font so we can use it ASAP on boot
+	# Store the font so we can use it ASAP on boot
 	if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
 		mkdir -p "$RC_LIBEXECDIR"/console
-		for font in /usr/share/consolefonts/"$consolefont".*; do
-			:
-		done
-		cp "$font" "$RC_LIBEXECDIR"/console
-		echo "${font##*/}" >"$RC_LIBEXECDIR"/console/font
+		setfont -O "$RC_LIBEXECDIR"/console/font
 	fi
 
 	return $retval

diff --git a/sh/init-early.sh.Linux.in b/sh/init-early.sh.Linux.in
index fb3860a..f9d2388 100644
--- a/sh/init-early.sh.Linux.in
+++ b/sh/init-early.sh.Linux.in
@@ -31,9 +31,8 @@ if service_present "$RC_DEFAULTLEVEL" consolefont ||
    service_present "$RC_BOOTLEVEL" consolefont; then
 	printf "\033%s" "$termencoding" >"$CONSOLE" 2>/dev/null
 	if [ -r "$RC_LIBEXECDIR"/console/font -a -x /usr/bin/setfont ]; then
-		font="$(cat "$RC_LIBEXECDIR"/console/font)"
 		[ -c "$CONSOLE" ] && cons="-C $CONSOLE"
-		setfont $cons "$RC_LIBEXECDIR"/console/"$font" 2>/dev/null
+		setfont $cons "$RC_LIBEXECDIR"/console/font 2>/dev/null
 	fi
 fi
 


             reply	other threads:[~2013-02-17  2:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17  2:49 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-03 18:05 [gentoo-commits] proj/openrc:master commit in: init.d/, sh/ William Hubbs
2012-02-20 23:11 William Hubbs
2012-01-28 18:32 Christian Ruppert
2012-01-22 18:00 William Hubbs
2011-12-20  4:01 William Hubbs
2011-11-19  0:05 William Hubbs
2011-10-16 23:02 Mike Frysinger
2011-07-05 23:42 William Hubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361065875.746bf5f78376e2e7b3e8bc843dfa1e4a3fa6a8e4.WilliamH@OpenRC \
    --to=williamh@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox