SCIENTIFIC-LINUX-USERS Archives

July 2005

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Paul A. Rombouts" <[log in to unmask]>
Reply To:
Paul A. Rombouts
Date:
Fri, 29 Jul 2005 23:06:45 +0200
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1231 bytes) , SL_pc_speaker.spec (1387 bytes)
Robert Haines wrote:
> Paul Rombouts wrote:
>> I just think that a "SL_pc_speaker.noarch.rpm" package would be a much 
>> more user-friendly solution for many users. I think I might even write 
>> one myself if enough people are interested.
> 
> 
> Me please!

OK, I have written a spec file, built a package from it, installed  the
package and tested it.

Instructions for use: take the attached spec file and build an rpm thus:

	rpmbuild -bb SL_pc_speaker.spec

You should find a package called SL_pc_speaker-1.0-1.noarch.rpm in your
RPMS directory (i.e. /usr/src/redhat/RPMS/noarch/ unless you have
changed the default).

Disclaimer: if your system breaks after you install the package, you get
to keep the pieces.


> Just out of interest, what would be the best way of doing this? Could an 
> rpm be made to add pcspkr into the initial RAM disk? If so, something to 
> do this for the microcode module as well (for i386) would be great...

I don't think adding pcspkr to the initial RAM disk would be a good
idea, and frankly I don't know how to do this. The rpm package I wrote
contains scripts that modify the rc.sysinit boot script such that the
pcspkr module gets loaded at an early stage together with a whole lot of
other kernel modules.

-- 
Paul Rombouts



%define modname pcspkr %define sysinitfile /etc/rc.d/rc.sysinit # Summary: Enables the PC speaker by loading the driver. Name: SL_pc_speaker Version: 1.0 Release: 1 License: GPL Group: SL Packager: Paul A. Rombouts BuildArchitectures: noarch requires: initscripts %description This package changes the rc.sysinit boot script so that the %{modname} kernel module is loaded at an early stage. This will allow the PC speaker to beep again. %files %post # # This script may not work on modified files. # if [ -f %{sysinitfile} ] ; then sed -e 's:^\([[:blank:]]*audio="\?\)\("\?[[:blank:]]*\)$:\1%{modname}\2:' %{sysinitfile} > %{sysinitfile}.tmp chmod --reference=%{sysinitfile} %{sysinitfile}.tmp mv -f %{sysinitfile}.tmp %{sysinitfile} fi modprobe %{modname} %postun if [ "$1" = "0" ] ; then if [ -f %{sysinitfile} ] ; then sed -e 's:^\([[:blank:]]*audio="\?\)%{modname}\("\?[[:blank:]]*\)$:\1\2:' %{sysinitfile} > %{sysinitfile}.tmp chmod --reference=%{sysinitfile} %{sysinitfile}.tmp mv -f %{sysinitfile}.tmp %{sysinitfile} fi fi %triggerin -- initscripts if [ -f %{sysinitfile} ] ; then sed -e 's:^\([[:blank:]]*audio="\?\)\("\?[[:blank:]]*\)$:\1%{modname}\2:' %{sysinitfile} > %{sysinitfile}.tmp chmod --reference=%{sysinitfile} %{sysinitfile}.tmp mv -f %{sysinitfile}.tmp %{sysinitfile} fi %changelog * Fri Jul 29 2005 Paul Rombouts <[log in to unmask]> - Wrote initial spec file based on examples by Troy Dawson.

ATOM RSS1 RSS2