]> git.pld-linux.org Git - packages/fbset.git/commitdiff
Zmieniłem fbset, żeby działał na podobnej zasadzie jak hdparm,
authorqnex <qnex@atlantis.ssw.krakow.pl>
Sun, 9 Jan 2000 17:18:08 +0000 (17:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
tzn. podczas startu systemu ustawiał tryby graficzne globalnie
i dodatkowo dla każdej konsoli z osobna (jeśli jest zdefiniowane).

Changed files:
    fbset.init -> 1.1
    fbset.spec -> 1.2
    fbset.sysconfig -> 1.1

fbset.init [new file with mode: 0644]
fbset.spec
fbset.sysconfig [new file with mode: 0644]

diff --git a/fbset.init b/fbset.init
new file mode 100644 (file)
index 0000000..4a7c556
--- /dev/null
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# hdpram        Sets up fbcon video modes.
+#
+#
+# chkconfig:   2345 5 95
+# description: fbset is a utility with which fbcons video modes can be read\
+#              and changed
+
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+[ -f /etc/sysconfig/fbset ] && . /etc/sysconfig/fbset
+
+# See how we were called.
+case "$1" in
+  start)
+       # Check if we have framebuffer in kernel.
+       if [ -f /proc/fb ]; then
+               # /proc files show as files with size=0, this is a workaround.
+               cat /proc/fb | grep -q "." || exit 0
+       else
+               exit 0
+       fi
+
+       if [ -n "${FBMODE_default}" ]; then
+       echo STarting...
+               show "Setting default video mode"
+               busy
+               /usr/sbin/fbset -a ${FBMODE_default}
+               deltext
+               ok
+       fi
+       for tty in /dev/tty[0-9]*; do
+               eval FBMODE=\${FBMODE_${tty#/dev/}}
+               if [ -n "${FBMODE}" ]; then
+                       # XXX fuser $tty <- sprawdziæ, czy tty jest wolna.
+                       show "Setting $tty video mode"
+                       busy
+                       /usr/bin/open -c ${tty#/dev/tty} -- /usr/sbin/fbset ${FBMODE}
+                       deltext
+                       ok
+               fi
+       done
+       touch /var/lock/subsys/fbset
+       ;;
+    stop)      
+       rm -f /var/lock/subsys/fbset
+       ;;
+  status)
+       # Check if we have framebuffer in kernel.
+       if [ -f /proc/fb ]; then
+               # /proc files show as files with size=0, this is a workaround.
+               cat /proc/fb | grep -q "." || exit 0
+               echo "Frame buffer present."
+       fi
+       ;;
+  restart|reload)
+       $0 stop
+       $0 start
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|status|restart|reload}"
+       exit 1
+esac
+
+exit 0
index 08bac945b421ae14ee5ca09db66b72ad62aab288..893b962adbfef1a7623f867ab8aecf508ab6dabc 100644 (file)
@@ -1,44 +1,63 @@
 Summary: Framebuffer utilities for changing video modes.
+Summary(pl): Nardzêdzie do zmieniania trybu graficznego we framebufferze.
 Name: fbset
 Version: 2.0.19990118
-Release: 2
+Release: 3
 Copyright: GPL
 Group: Applications/System
+Group(pl): Aplikacje/System
 Source: http://www.cs.kuleuven.ac.be/~geert/bin/fbset-19990118.tar.gz
-Patch: fbset-2.0-pre-19981028.patch
+Source1: fbset.init
+Source2: fbset.sysconfig
+URL: http://www.cs.kuleuven.ac.be/~geert/Console/
 BuildRoot: /var/tmp/%{name}-root
 
 %description
 fbset is a utility for querying and changing video modes of fbcon consoles.
 
+%description -l pl
+fbset jest narzêdziem do sprawdzania i zmieniania trybu graficznego na
+konsolach fbcon.
+
 %prep
 %setup -q -n fbset
-%patch -p1
 
 %build
-make
+make OPTFLAGS="$RPM_OPT_FLAGS"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/dev
-mkdir -p $RPM_BUILD_ROOT/usr/sbin
-mkdir -p $RPM_BUILD_ROOT/usr/man/man5
-mkdir -p $RPM_BUILD_ROOT/usr/man/man8
-make install PREFIX=$RPM_BUILD_ROOT
-strip $RPM_BUILD_ROOT/usr/sbin/fbset
-%ifarch sparc sparc64
-mkdir -p $RPM_BUILD_ROOT/etc
-cp etc/fb.modes.ATI $RPM_BUILD_ROOT/etc/fb.modes
-%endif
+install -d $RPM_BUILD_ROOT{/dev,/etc/{sysconfig,rc.d/init.d},%{_sbindir},%{_mandir}/man{5,8}}
+
+install -s fbset $RPM_BUILD_ROOT%{_sbindir}
+install fb.modes.5 $RPM_BUILD_ROOT%{_mandir}/man5
+install fbset.8 $RPM_BUILD_ROOT%{_mandir}/man8
+
+install etc/fb.modes.ATI $RPM_BUILD_ROOT/etc/fb.modes
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/fbset
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/fbset
+
+mknod $RPM_BUILD_ROOT/dev/fb0 c 29 0
+
+gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/*
+
+%post
+/sbin/chkconfig --add fbset
+
+%preun
+if [ "$1" = "0" ]; then
+       /sbin/chkconfig --del fbset
+fi
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root)
-/dev/*
-/usr/sbin/*
-/usr/man/man[58]/*
-%ifarch sparc sparc64
-%config /etc/fb.modes
-%endif
+%defattr(644,root,root,0755)
+/dev/fb0
+%attr(755,root,root) /usr/sbin/fbset
+%attr(754,root,root) /etc/rc.d/init.d/fbset
+%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/fbset
+%config(noreplace) %verify(not size mtime md5) /etc/fb.modes
+%{_mandir}/man8/*
diff --git a/fbset.sysconfig b/fbset.sysconfig
new file mode 100644 (file)
index 0000000..1262fc5
--- /dev/null
@@ -0,0 +1,20 @@
+# This file lets you set your default console video mode and
+# video modes for individual virtual consoles.
+# See /etc/fb.modes for sample video mode definitions.
+
+FBMODE_default=
+#FBMODE_default="640x480-100"
+
+FBMODE_tty1=
+#FBMODE_tty1="800x600-100"
+FBMODE_tty2=
+FBMODE_tty3=
+FBMODE_tty4=
+FBMODE_tty5=
+FBMODE_tty6=
+FBMODE_tty7=
+FBMODE_tty8=
+FBMODE_tty9=
+FBMODE_tty10=
+FBMODE_tty11=
+FBMODE_tty12=
This page took 0.176753 seconds and 4 git commands to generate.