une commande
/etc/apt/sources.list Compilation du kernel Configuration Patch et compilation Création et installation du paquet non-initrd kernel pour Debian Boot loader (chargeur d'amorçage) Le modem Identification Installation des pilotes La carte graphique Installation des pilotes propriétaires ATI Quelques tests Le Wifi ACPI Gestion de la fréquence de la CPU Démarrage personnalisé Le lecteur d'empruntes
## Stable ## deb http://security.debian.org/ stable/updates main contrib non-free deb ftp://ftp.fr.debian.org/debian stable main contrib non-free deb-src ftp://ftp.fr.debian.org/debian stable main contrib non-free ## Testing ## #deb ftp://ftp.fr.debian.org/debian/ testing main contrib non-free ## unstable ## deb-src ftp://ftp.fr.debian.org/debian unstable main contrib non-free #deb ftp://ftp.fr.debian.org/debian unstable main contrib non-free # mplayer,acidrip, acroread, acroread-plugins, autopano-sift... deb http://www.debian-multimedia.org stable main # Emacs-snapshot deb http://emacs.orebokech.com sarge main deb-src http://emacs.orebokech.com sarge main
su && apt-get install kernel-package ncurses-dev fakeroot wget bzip2 unzip gzip
su && mkdir /usr/local/pi && chown pi:pi /usr/local/pi && exit mkdir -p /usr/local/pi/src/kernel/ && cd /usr/local/pi/src/kernel/ # Téléchagement du kernel et de la signature wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2.sign # On vérifie que le fichier n'est pas corrompu gpg --verify linux-2.6.20.tar.bz2.sign
gpg: Signature made dim 04 fév 2007 20:08:30 CET using DSA key ID 517D0F0E gpg: Good signature from "Linux Kernel Archives Verification KeyTélécharger le patch Suspend2 pour ce kernel:" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: C75D C40A 11D7 AF88 9981 ED5B C86B A06A 517D 0F0E
wget http://www.suspend2.net/downloads/all/suspend2-2.2.9-for-2.6.20.patch.bz2
tar xjf linux-2.6.20.tar.bz2 wget -O linux-2.6.20/.config http://piprim.tuxfamily.org/linux/t43/files/config-2.6.20 make oldconfig
CONFIG_FB is not set CONFIG_FB_VESA=y is supposed to work, but it appears that it can cause "mtrr overlapping" errors; CONFIG_FB_RADEON=y definitely causes problems, so disable it.Voir ici pour plus d'informations.
make menuconfig
cd linux-2.6.20 make
bzcat ../suspend2-2.2.9-for-2.6.20.patch.bz2 | patch -p1
CONFIG_SUSPEND2=y CONFIG_SUSPEND2_FILE=y CONFIG_SUSPEND2_SWAP=y CONFIG_CRYPTO_LZF=yOn peut aussi utiliser la commande suivante et aller dans les menus Power Management options et Cryptograpic options.
make menuconfig
make-kpkg clean && fakeroot make-kpkg --revision=T43.1.0 kernel_image cd .. su && dpkg -i linux-image-2.6.20_T43.1.0_i386.deb
[ -h /usr/src/linux ] && rm -f /usr/src/linux ln -s /usr/local/pi/src/kernel/linux-2.6.20 /usr/src/linux
lspci -v | less # Taper 'q' pour sortir.
...
01:00.0 VGA compatible controller: ATI Technologies Inc M22 [Radeon Mobility M300] (prog-if 00 [VGA])
Subsystem: IBM Unknown device 056e
Flags: bus master, fast devsel, latency 0, IRQ 169
Memory at c0000000 (32-bit, prefetchable) [size=128M] <---- INFORMATION ICI
I/O ports at 3000 [size=256]
Memory at a8100000 (32-bit, non-prefetchable) [size=64K]
[virtual] Expansion ROM at a8120000 [disabled] [size=128K]
...
Ce qui permet de passer l'option vram:128 au noyau par le fichier /boot/grub/menu.lst| Nombre de couleurs | 640x480 | 800x600 | 1024x768 | 1280x1024 | 1600x1200 | 1400x1050 |
| 8 bits ( 256 ) | 769 | 771 | 773 | 775 | 796 | ??? |
| 15 bits ( 32768 ) | 784 | 787 | 790 | 793 | 797 | ??? |
| 16 bits ( 65536 ) | 785 | 788 | 791 | 794 | 798 | 834 |
| 24 bits ( 16,8 M ) | 786 | 789 | 792 | 795 | 799 | 835 |
| 32 bits ( 16,8 M étendu ) | ??? | ??? | ??? | ??? | ??? | 836 |
title Debian, kernel 2.6.20 root (hd0,2) kernel /boot/vmlinuz-2.6.20 root=/dev/sda3 ro video=vesafb,nomtrr,ywrap,vram:128 vga=836 acpi_sleep=s3_bios resume2=swap:/dev/sda6 elevator=cfq ide1=noprobe libata.atapi_enabled=1 savedefault boot title Debian, kernel 2.6.20 (recovery mode) root (hd0,2) kernel /boot/vmlinuz-2.6.20 root=/dev/sda3 ro single bootQuelques explications sur les paramètres du noyau se trouve ici.
cd /usr/local/pi/src/ mkdir modem cd modem wget http://linmodems.technion.ac.il/packages/scanModem.gz gunzip scanModem.gz && chmod u+x scanModem && su && ./scanModem less Modem/ModemData.txt && exit
[ -e /usr/local/pi/src/modem/ ] || mkdir /usr/local/pi/src/modem/
cd /usr/local/pi/src/modem/ unzip hsfmodem_7.60.00.04full_i386.deb.zip su && dpkg -i hsfmodem_7.60.00.04full_i386.deb && exit
Note: HDA support not compiled in the driver (requires a 2.6.16 or later kernel)
Config for modem unit 0: /dev/ttySHSF0
Device instance: 0-PCI-8086:266d-1014:0574
HW revision : CXT23 SSD=20 LSD=0x10
HW profile name: hsfmc97ich
Registration ID: PROTECTED
License owner : PROTECTED
License key : PROTECTED
License status : OK
Current region : FRANCE (T.35 code: 003D)
The /dev/modem alias (symlink) points to ttySHSF0
Pour configurer la connexion, on peut utiliser kppp. Il faut cependant appartenir au groupe dip.id -Gn
adduser votre_loggin dit
mkdir /usr/local/pi/src/ati
cd /usr/local/pi/src/ati apt-get install debhelper module-assistant libstdc++5 fontconfig libgcc sh ./ati-driver-installer-8.36.5-x86.x86_64.run --buildpkg Debian/etch dpkg -i *.deb cd /usr/src module-assistant prepare module-assistant a-i fglrx cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup aticonfig -f --initial --input=/etc/X11/xorg.conf echo "fglrx" >> /etc/modules
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "dri"
# Access to OpenGL ICD is allowed for all users:
Mode 0666
# Access to OpenGL ICD is restricted to a specific user group:
# Group 100 # users
# Mode 0660
EndSection
Section "Files"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
# This loads the DBE extension module.
Load "dbe" # Double buffer extension
# This loads the miscellaneous extensions module, and disables
# initialisation of the XFree86-DGA extension within that module.
SubSection "extmod"
Option "omit xfree86-dga" # don't initialise the DGA extension
EndSubSection
# This loads the Type1 and FreeType font modules
Load "type1"
Load "freetype"
# This loads the GLX module
Load "glx" # libglx.a
Load "dri" # libdri.a
EndSection
Section "Extensions"
Option "Composite" "Disable" #make DRI work with fglrx.
EndSection
Section "ServerFlags"
# To disable the / mode switching
# sequences.
# Option "Dont Zoom"
# take a look to http://geeks-have-feelings-too.net/ati-driver-problem-aiglx-error-dricreatenewscreen/
Option "AIGLX" "off"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "fr"
Option "XkbVariant" "nodeadkeys"
EndSection
Section "InputDevice"
Identifier "Trackpoint"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "SHMConfig" "true"
Option "CircularScrolling" "true"
Option "CircScrollTrigger" "8"
Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
Identifier "External USB Mouse"
Driver "mouse"
Option "Device" "/dev/input/mouse1"
Option "SendCoreEvents" "true"
Option "Protocol" "ImPS/2"
Option "Emulate3Buttons" "false"
Option "ZAxisMapping" "4 5"
Option "EmulateWheel" "false"
EndSection
Section "Monitor"
Identifier "Monitor[0]"
EndSection
Section "Monitor"
Identifier "Monitor[1]"
EndSection
Section "Device"
Identifier "Device[0]"
Driver "fglrx"
# ### generic DRI settings ###
# === disable PnP Monitor ===
#Option "NoDDC"
# === disable/enable XAA/DRI ===
Option "no_accel" "no"
Option "no_dri" "no"
# === misc DRI settings ===
Option "mtrr" "off" # disable DRI mtrr mapper, driver has its own code for mtrr
# ### FireGL DDX driver module specific settings ###
# === Screen Management ===
# Option "DesktopSetup" "(null)"
# === TV-out Management ===
Option "TVFormat" "PAL-B"
Option "TVStandard" "VIDEO"
Option "TVHSizeAdj" "0"
Option "TVVSizeAdj" "0"
Option "TVHPosAdj" "0"
Option "TVVPosAdj" "0"
Option "TVHStartAdj" "0"
Option "TVColorAdj" "0"
Option "GammaCorrectionI" "0x00000000"
Option "GammaCorrectionII" "0x00000000"
# === OpenGL specific profiles/settings ===
Option "Capabilities" "0x00000000"
Option "CapabilitiesEx" "0x00000000"
# === Uncomment if you encounter problems with mpalyer === Begin
# Option "OpenGLOverlay" "off"
# Option "PseudoColorVisuals" "off"
# Option "VideoOverlay" "on"
#..................................................... === End
# === Center Mode (Laptops only) ===
Option "CenterMode" "off"
# === QBS Management ===
Option "Stereo" "off"
Option "StereoSyncEnable" "1"
# === FSAA Management ===
Option "FSAAEnable" "no"
Option "FSAAScale" "1"
Option "FSAADisableGamma" "no"
Option "FSAACustomizeMSPos" "no"
Option "FSAAMSPosX0" "0.000000"
Option "FSAAMSPosY0" "0.000000"
Option "FSAAMSPosX1" "0.000000"
Option "FSAAMSPosY1" "0.000000"
Option "FSAAMSPosX2" "0.000000"
Option "FSAAMSPosY2" "0.000000"
Option "FSAAMSPosX3" "0.000000"
Option "FSAAMSPosY3" "0.000000"
Option "FSAAMSPosX4" "0.000000"
Option "FSAAMSPosY4" "0.000000"
Option "FSAAMSPosX5" "0.000000"
Option "FSAAMSPosY5" "0.000000"
# === Misc Options ===
Option "UseFastTLS" "2"
Option "BlockSignalsOnLock" "on"
Option "UseInternalAGPGART" "no"
Option "ForceGenericCPU" "no"
Option "KernelModuleParm" "agplock=0"
BusID "PCI:1:0:0" # vendor=1002, device=3154
Screen 0
EndSection
Section "Device"
Identifier "Device[1]"
Driver "fglrx"
BusID "PCI:1:0:0" # vendor=1002, device=3154
Screen 1
EndSection
Section "Screen"
Identifier "Screen[0]"
Device "Device[0]"
Monitor "Monitor[0]"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1400x1050" "1280x1024" "1024x768" "800x600" "640x480"
Viewport 0 0
EndSubSection
EndSection
Section "Screen"
Identifier "Screen[1]"
Device "Device[1]"
Monitor "Monitor[1]"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
Viewport 0 0
EndSubSection
EndSection
# **********************************************************************
# ServerLayout sections.
# **********************************************************************
# Any number of ServerLayout sections may be present. Each describes
# the way multiple screens are organised. A specific ServerLayout
# section may be specified from the X server command line with the
# "-layout" option. In the absence of this, the first section is used.
# When now ServerLayout section is present, the first Screen section
# is used alone.
Section "ServerLayout"
Identifier "Default Layout"
# Each Screen line specifies a Screen section name, and optionally
# the relative position of other screens. The four names after
# primary screen name are the screens to the top, bottom, left and right
# of the primary screen.
Screen "Screen[0]"
Screen "Screen[1]" RightOf "Screen[0]"
InputDevice "Generic Keyboard"
InputDevice "Trackpoint"
InputDevice "Synaptics Touchpad"
InputDevice "External USB Mouse"
EndSection
Remarques importantes :
(EE) AIGLX error: dlsym for __driCreateNewScreen_20050727 failed (/usr/lib/dri/fglrx_dri.so: undefined symbol: __driCreateNewScreen_20050727) (EE) AIGLX: reverting to software renderingPour y remédier il faut désactiver le support AIGLX (cf. driver-problem-aiglx-error-dricreatenewscreen).
Section "ServerFlags"
Option "AIGLX" "off"
EndSection
Section "Extensions"
Option "Composite" "Disable" #make DRI work with fglrx.
EndSection
/etc/init.d/kdm restart || /etc/init.d/gdm restart || init 3
aticonfig --set-powerstate=1
libGL: XF86DRIGetClientDriverName: 8.36.5 fglrx (screen 0) libGL: OpenDriver: trying /usr/lib/dri/fglrx_dri.so libGL: XF86DRIGetClientDriverName: 8.36.5 fglrx (screen 0) drmOpenByBusid: busid is PCI:1:0:0 drmOpenDevice: minor is 0 drmOpenDevice: node name is /dev/dri/card0 drmOpenDevice: open result is 4, (OK) drmOpenByBusid: drmOpenMinor returns 4 drmOpenByBusid: drmGetBusid reports PCI:1:0:0 Can't open configuration file /etc/drirc: No such file or directory. Can't open configuration file /home/pi/.drirc: No such file or directory. display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: ATI MOBILITY RADEON X300 OpenGL version string: 2.0.6458 (8.36.5)Le message Can't open configuration file /etc/drirc: No such file or directory montre qu'il n'y pas de fichier de configuration.
apt-get install driconf && exit && driconf
Using GLX_SGIX_pbuffer 1126 frames in 5.0 seconds = 225.200 FPS 1379 frames in 5.0 seconds = 275.800 FPS 1367 frames in 5.0 seconds = 273.400 FPSSortie de la commande fgl_glxgears -fbo
Using GL_EXT_framebuffer_object 481 frames in 5.0 seconds = 96.200 FPS 493 frames in 5.0 seconds = 98.600 FPS 494 frames in 5.0 seconds = 98.800 FPS
Don't forget to copy firmware to your hotplug's firmware directory and have the hotplug tools in place.On peut compléter l'installation avec wireless-tools:
apt-get install wireless-tools echo "options ipw2200 disable=1" > /etc/modutils/ipw2200 && update-modules
apt-get install acpid tpb hibernate hdaps-utils
/etc/acpi/
|-- powerbtn.sh
|-- ibm-acpi.sh
|-- hibernate_lid.sh
|-- fglrx-powermode.sh
`-- events
|-- powerbtn
|-- lid
`-- ibm-acpi
Les fichiers powerbtn, lid et ibm-acpi décrivent les actions associés aux événements:event=button[ /]power action=/etc/acpi/powerbtn.shcat /etc/acpi/events/lid
event=button[ /]lid action=/etc/acpi/hibernate_lid.shcat /etc/acpi/events/ibm-acpi
event=(ibm/|ac_adapter) action=/etc/acpi/ibm-acpi.sh "%e"Après avoir modifié des fichiers du répertoire /etc/acpi/events/ il ne faut pas oublier de redémarrer le démon:
/etc/init.d/acpid reload
#!/bin/bash
FANCONTROL="tp-fancontrol -u"
case "$1" in
#Fn+F1
"ibm/hotkey HKEY 00000080 00001001")
/usr/bin/logger -i -t "IBM Button F1 not implemented"
;;
# Fn+F12
"ibm/hotkey HKEY 00000080 0000100c")
$FANCONTROL
/usr/sbin/hibernate -F /etc/hibernate/suspend2.conf
;;
# Fn+F4
"ibm/hotkey HKEY 00000080 00001004")
$FANCONTROL
/usr/sbin/hibernate -F /etc/hibernate/ram.conf
;;
# Fn+F6
"ibm/hotkey HKEY 00000080 00001006")
## toggle wlan
if lsmod | grep -q ipw2200 ; then
rmmod ipw2200
else
modprobe ipw2200 led=1
fi
;;
# Fn+F8
"ibm/hotkey HKEY 00000080 00001008")
# irda
/usr/bin/logger -i -t "IBM Button $1 not implemented"
;;
# Fn+F3
"ibm/hotkey HKEY 00000080 00001003")
/etc/acpi/fglrx-powermode.sh --light
;;
"ac_adapter AC 00000080 00000001" | "ac_adapter AC 00000080 00000000")
/etc/acpi/fglrx-powermode.sh
;;
*)
# log everything else to syslog
/usr/bin/logger -i -t "IBM Special Button" $1
;;
cat /etc/acpi/fglrx-powermode.sh
#!/bin/bash
RADEONTOOL='/usr/sbin/radeontool'
# spindown time for HD (man hdparm for valid values)
# I prefer 2 hours for acad and 2 min for batt
ACAD_HD=244
BATT_HD=24
# Power management level
# 255 (off) on AC
# 128 (medium) on batt
ACAD_PM=255
BATT_PM=128
light=0
while true
do
case $1 in
--light)
light=1
;;
*)
break
;;
esac
shift
done
getXuser() {
user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
if [ x"$user" = x"" ]; then
user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
fi
if [ x"$user" != x"" ]; then
userhome=`getent passwd $user | cut -d: -f6`
export XAUTHORITY=$userhome/.Xauthority
else
export XAUTHORITY=""
fi
}
$RADEONTOOL light | grep -qe "off$"
light_off=$?
[ "$light" = "0" ] && sleep 5 # Wait update ac_adapter state
if grep -q off-line /proc/acpi/ac_adapter/*/state; then
on_dc=1
else
on_dc=0
fi
if [ ${light_off} -eq 1 -o ${on_dc} -eq 1 ]; then
/usr/bin/logger "fglrx: setting low power"
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
powermode=`/usr/bin/aticonfig --lsp | grep -m1 low | cut -b 3-3`
if [ x"$powermode" != x"" ]; then
su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null
fi
fi
done
[ "$light" = "1" ] && $RADEONTOOL light off
test -e /sbin/laptop_mode && /sbin/laptop_mode start && /usr/bin/logger "Running /sbin/laptop_mode start"
/usr/bin/logger "Setting HD spindown with hdparm -S $BATT_HD /dev/sda."
/sbin/hdparm -S $BATT_HD /dev/sda > /dev/null 2>&1
/usr/bin/logger "Setting HD powersaving with hdparm -B $BATT_PM /dev/sda."
/sbin/hdparm -B $BATT_PM /dev/sda > /dev/null 2>&1
else
/usr/bin/logger "fglrx: setting default powermode"
for x in /tmp/.X11-unix/*; do
displaynum=`echo $x | sed s#/tmp/.X11-unix/X##`
getXuser;
if [ x"$XAUTHORITY" != x"" ]; then
export DISPLAY=":$displaynum"
powermode=`/usr/bin/aticonfig --lsp | grep -m1 default | cut -b 3-3`
if [ x"$powermode" != x"" ]; then
su $user -c "/usr/bin/aticonfig --set-powerstate=$powermode --effective=now" &>/dev/null
fi
fi
done
[ "$light" = "1" ] && $RADEONTOOL light on
test -e /sbin/laptop_mode && /sbin/laptop_mode stop && /usr/bin/logger "Running /sbin/laptop_mode stop"
logger "Setting HD spindown hdparm -S $ACAD_HD /dev/sda."
/sbin/hdparm -S $ACAD_HD /dev/sda > /dev/null 2>&1
logger "Setting HD powersaving hdparm -B $ACAD_PM /dev/sda."
/sbin/hdparm -B $ACAD_PM /dev/sda > /dev/null 2>&1
fi
cat /etc/acpi/hibernate_lid.sh
#!/bin/bash #Ne Rien faire si l'écran est ouvert. grep -q open /proc/acpi/button/lid/LID/state && exit 0 #Sinon hiberner dans la RAM... tp-fancontrol -u /usr/sbin/hibernate -F /etc/hibernate/ram.confcat /etc/acpi/powerbtn.sh
# If powersaved is running, let it process the acpi event
if pidof powersaved; then
exit 0
fi
if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
then
dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0
else
/sbin/shutdown -h now "Power button pressed"
fi
Ces scripts font appel aux fichiers de configuration de hibernate.Verbosity 0 LogFile /var/log/hibernate.log LogVerbosity 1 Distribution debian SaveClock restore-only ### devices # IncompatibleDevices /dev/dsp /dev/video* ### diskcache # DisableWriteCacheOn /dev/hda ### filesystems UnmountFSTypes smbfs nfs ### hardware_tweaks IbmAcpi yes ### modules UnloadBlacklistedModules yes LoadModules auto ### xhacks SwitchToTextMode yescat /etc/hibernate/ram.conf
TryMethod ususpend-ram.conf TryMethod sysfs-ram.conf RadeonTool yescat /etc/hibernate/suspend2.conf
### suspend2 (for Software Suspend 2)
UseSuspend2 yes
Reboot no
EnableEscape yes
DefaultConsoleLevel 1
Compressor lzf
Encryptor none
# For fglrx
ProcSetting extra_pages_allowance 20000
# Scale CPU to full speed to make sure we suspend as fast as possible.
FullSpeedCPU yes
Include common.conf
apt-get install cpufreqd
apt-get install gkrellm gkrellm-x86info
#! /bin/sh
PROGRAM="/usr/bin/tp-fancontrol"
PARAMS="-l -s 8 -d"
checkconfig() {
if [ ! -e /proc/acpi/ibm/fan ]; then
echo "The ibm_acpi module must be loaded with \"experimental=1\" to use \"pt-fancontrol\""
return 1
fi
}
case "$1" in
start)
echo "Loading personal parameters."
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "scaling_governor : "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
checkconfig && $PROGRAM $PARAMS && echo "tp-fancontrol : started"
# fix dvd and cdrom links
rm -f /dev/cdrom /dev/dvd
if grep -q MATSHITA /proc/scsi/scsi
then
# running libata enabled kernel
ln -s /dev/sr0 /dev/cdrom
ln -s /dev/sr0 /dev/dvd
logger "linking /dev/sr0 to /dev/dvd"
else
# running kernel with only IDE support
ln -s /dev/hdc /dev/cdrom
ln -s /dev/hdc /dev/dvd
logger "linking /dev/hdc to /dev/dvd"
fi
;;
stop)
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "scaling_governor : "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
$PROGRAM -k
;;
reload|restart|force-reload)
echo "Stoping personal parameters."
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
Après avoir copier ce script dans le fichier /etc/init.d/personal il faut exécuter la commande suivante pour qu'il soit exécuté à chaque démarrage du système:
update-rc.d personal defaults
update-rc.d -f SERVICE remove
Last modified: Sun Jul 1 22:12:49 CEST 2007