diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2011-02-10 21:05:50 +0000 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2011-04-30 21:42:35 -0500 |
commit | df16bd0d027b098d92475afd9f6cc74d23ea3627 (patch) | |
tree | dee4596c5ab96d64084a310a5ee5af63cb3f63d8 | |
parent | add --visit-items to dialog commands (diff) | |
download | livecd-tools-df16bd0d027b098d92475afd9f6cc74d23ea3627.tar.gz livecd-tools-df16bd0d027b098d92475afd9f6cc74d23ea3627.tar.bz2 livecd-tools-df16bd0d027b098d92475afd9f6cc74d23ea3627.zip |
Add conversion of GPM as first example for BL2 work.
-rwxr-xr-x | autoconfig | 24 | ||||
-rw-r--r-- | autoconfig-init.d-addons/autoconfig-gpm-pre | 36 |
2 files changed, 39 insertions, 21 deletions
@@ -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: |