* [gentoo-commits] proj/livecd-tools:master commit in: /, autoconfig-init.d-addons/
@ 2011-05-01 2:49 William Hubbs
0 siblings, 0 replies; only message in thread
From: William Hubbs @ 2011-05-01 2:49 UTC (permalink / raw
To: gentoo-commits
commit: df16bd0d027b098d92475afd9f6cc74d23ea3627
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 10 21:05:50 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun May 1 02:42:35 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=df16bd0d
Add conversion of GPM as first example for BL2 work.
---
autoconfig | 24 ++---------------
autoconfig-init.d-addons/autoconfig-gpm-pre | 36 +++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 21 deletions(-)
diff --git a/autoconfig b/autoconfig
index 282fd60..4763bc2 100755
--- a/autoconfig
+++ b/autoconfig
@@ -504,29 +504,11 @@ start() {
[ -f /etc/sysconfig/gentoo ] && source /etc/sysconfig/gentoo
# Mouse
+ # FIXME: If MOUSE_DEVICE is empty, we actually do not want to do anything, not even start gpm.
if [ -n "${MOUSE_DEVICE}" ]
then
- einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
- source /etc/sysconfig/mouse
- if [ -x /usr/sbin/gpm ]
- then
- if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]
- then
- sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
- else
- echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
- fi
-
- if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]
- then
- sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
- else
- echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
- fi
-
- [ "${GPM}" = "yes" ] \
- && [ -x /etc/init.d/gpm ] && /etc/init.d/gpm start
- fi
+ :
+ # Migrated to autoconfig-gpm-pre
fi
[ "${DETECT}" = "no" ] && DHCP="no"
diff --git a/autoconfig-init.d-addons/autoconfig-gpm-pre b/autoconfig-init.d-addons/autoconfig-gpm-pre
new file mode 100644
index 0000000..af52b0e
--- /dev/null
+++ b/autoconfig-init.d-addons/autoconfig-gpm-pre
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Do one of the following:
+# Add to /etc/rc.conf: rc_gpm_need="autoconfig-gpm-pre"
+# XOR
+# Add to /etc/conf.d/gpm: rc_need="autoconfig-gpm-pre"
+
+depend() {
+ before gpm
+ need hwsetup
+}
+
+start() {
+ # FIXME: If MOUSE_DEVICE is empty, we actually do not want to do anything, not even start gpm.
+ # created by hwsetup
+ source /etc/sysconfig/gentoo
+ source /etc/sysconfig/mouse
+ einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
+
+ if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]; then
+ sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
+ else
+ echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
+ fi
+
+ if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]; then
+ sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
+ else
+ echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
+ fi
+}
+
+# vim: ft=gentoo-init-d:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-01 2:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-01 2:49 [gentoo-commits] proj/livecd-tools:master commit in: /, autoconfig-init.d-addons/ William Hubbs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox