rpms/915resolution/devel 915resolution-config, NONE, 1.1 915resolution-init, NONE, 1.1 915resolution-pm-hook, NONE, 1.1 915resolution.spec, 1.5, 1.6 README.fedora, 1.3, 1.4

Chris Weyl (cweyl) fedora-extras-commits at redhat.com
Mon Feb 19 18:27:16 UTC 2007


Author: cweyl

Update of /cvs/extras/rpms/915resolution/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19653

Modified Files:
	915resolution.spec README.fedora 
Added Files:
	915resolution-config 915resolution-init 915resolution-pm-hook 
Log Message:
update for BZ#219236



--- NEW FILE 915resolution-config ---
# Mode to overwrite
# RESOLUTION="58 1680 1050"


--- NEW FILE 915resolution-init ---
#!/bin/bash
#
#	/etc/rc.d/init.d/915resolution
#
# Starts the 915resulution helper
#
# chkconfig: - 65 35
# description: 915resolution tool
# processname: 915resolution
# Source function library.
. /etc/init.d/functions

test -x /usr/sbin/915resolution || exit 0

RETVAL=0
prog="915resolution"

start() {
        if [ -r /etc/sysconfig/915resolution ]; then
                . /etc/sysconfig/915resolution
        fi
        if [ -n "$RESOLUTION" ]; then
                echo -n $"Starting $prog: "
	        /usr/sbin/915resolution $RESOLUTION >/dev/null 2>&1
	        RETVAL=$?
	        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/915resolution
	        echo
        fi
}

stop() {
	rm -f /var/lock/subsys/915resolution
}

#
#	See how we were called.
#
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  reload|restart)
	stop
	start
	RETVAL=$?
	;;
  condrestart)
	if [ -f /var/lock/subsys/915resolution ]; then
	    stop
	    start
	fi
	;;
  status)
	[ -f /var/lock/subsys/915resolution ]
	RETVAL=$?
	;;
  *)
	echo $"Usage: $0 {condrestart|start|stop|restart|reload|status}"
	exit 1
esac

exit $RETVAL


--- NEW FILE 915resolution-pm-hook ---
#!/bin/sh

case "$1" in
	thaw|resume)
		{ /sbin/service 915resolution start ; } 2>/dev/null
		;;
	*)
		;;
esac

exit $?


Index: 915resolution.spec
===================================================================
RCS file: /cvs/extras/rpms/915resolution/devel/915resolution.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- 915resolution.spec	7 Dec 2006 02:52:13 -0000	1.5
+++ 915resolution.spec	19 Feb 2007 18:26:43 -0000	1.6
@@ -1,20 +1,29 @@
 Name:           915resolution
 Version:        0.5.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Intel video BIOS hack to support certain resolutions 
 
 Group:          User Interface/X Hardware Support 
 License:        Public Domain 
 URL:            http://www.geocities.com/stomljen/ 
 Source0:        http://www.geocities.com/stomljen/%{name}-%{version}.tar.gz
+Source1:        %{name}-init
+Source2:        %{name}-config
+Source3:        %{name}-pm-hook
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-# this doesn't make much sense on ppc.  That, and it fails in build...
+# this doesn't make much sense on ppc.  That, and it fails to build :)
 ExcludeArch:    ppc
 
 # simple "get it going" instructions
 Source100:      README.fedora
 
+# for the add/remove/condrestart service stuff.
+Requires(post):   /sbin/chkconfig
+Requires(preun):  /sbin/chkconfig
+Requires(preun):  /sbin/service
+
+
 %description
 915resolution is a tool to modify the video BIOS of the 800 and 900 series
 Intel graphics chipsets. This includes the 845G, 855G, and 865G chipsets, as
@@ -48,18 +57,51 @@
 mkdir -p %{buildroot}%{_sbindir}
 cp %{name} %{buildroot}%{_sbindir}
 
+# ...and the associated support bits
+mkdir -p %{buildroot}%{_sysconfdir}/rc.d/init.d
+install -m 0755 -T %{SOURCE1} \
+    %{buildroot}%{_sysconfdir}/rc.d/init.d/915resolution
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
+install -m 0644 -T %{SOURCE2} \
+    %{buildroot}%{_sysconfdir}/sysconfig/915resolution
+mkdir -p %{buildroot}%{_sysconfdir}/pm/hooks
+install -m 0755 -T %{SOURCE3} \
+    %{buildroot}%{_sysconfdir}/pm/hooks/99resolution
+
 
 %clean
 rm -rf %{buildroot}
 
 
+%post
+# This adds the proper /etc/rc*.d links for the script
+/sbin/chkconfig --add 915resolution
+
+
+%preun
+if [ $1 = 0 ]; then
+    /sbin/service 915resolution stop >/dev/null 2>&1 || :
+    /sbin/chkconfig --del 915resolution
+fi
+
+# no postun scriptlet is provided to "restart" the service on upgrade as this
+# doesn't seem entirely appropriate.  explanations as to why this is wrong are
+# welcome :)
+
 %files
 %defattr(-,root,root,-)
 %doc LICENSE.txt README* changes.log chipset_info.txt dump_bios
 %{_sbindir}/*
+%{_sysconfdir}/rc.d/init.d/*
+%{_sysconfdir}/pm/hooks/*
+%config(noreplace) %{_sysconfdir}/sysconfig/*
 
 
 %changelog
+* Mon Feb 19 2007 Chris Weyl <cweyl at alumni.drew.edu> 0.5.2-4
+- add initscript infrastructure from Bojan Smojver, who kindly did most of the
+  work to implement it.  Thanks Bojan! :)
+
 * Tue Aug 01 2006 Chris Weyl <cweyl at alumni.drew.edu> 0.5.2-3
 - excludearch ppc
 


Index: README.fedora
===================================================================
RCS file: /cvs/extras/rpms/915resolution/devel/README.fedora,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- README.fedora	7 Dec 2006 02:52:13 -0000	1.3
+++ README.fedora	19 Feb 2007 18:26:43 -0000	1.4
@@ -7,12 +7,12 @@
 Note that the intel xorg drivers are supposed to deal with displaying to
 non-bios modes "real soon now"; hence this setup technique.
 
+Note also the prior method used has changed (but should still work), thanks to
+an actual initscript framework :)
+
 1.  Read README.txt, in this directory...  Figure out the proper invocation of
     the binary for your hardware.
-2.  Edit /etc/rc.local.  Include as a line in that file a call to
-    915resolution; a la: 
-
-        /usr/sbin/915resolution ....
-
-    Where .... is the proper parameters to pass 915resolution.
+2.  Edit /etc/sysconfig/915resolution.  Modify "RESOLUTION" to be the proper
+    modestring to pass 915resolution for your hardware.
+3.  Enjoy widescreen :)
 




More information about the scm-commits mailing list