diff options
Diffstat (limited to 'examples/hooks')
-rwxr-xr-x | examples/hooks/beryl.sh | 78 | ||||
-rwxr-xr-x | examples/hooks/ipw2100.sh | 28 | ||||
-rwxr-xr-x | examples/hooks/ipw2200.sh | 28 | ||||
-rwxr-xr-x | examples/hooks/ipw3945.sh | 23 | ||||
-rwxr-xr-x | examples/hooks/madwifi.sh | 23 | ||||
-rwxr-xr-x | examples/hooks/nvidia-legacy.sh | 51 | ||||
-rwxr-xr-x | examples/hooks/rt2570.sh | 15 | ||||
-rwxr-xr-x | examples/hooks/rt2x00.sh | 24 | ||||
-rwxr-xr-x | examples/hooks/sun-java5.sh | 15 | ||||
-rwxr-xr-x | examples/hooks/sun-java6.sh | 15 |
10 files changed, 300 insertions, 0 deletions
diff --git a/examples/hooks/beryl.sh b/examples/hooks/beryl.sh new file mode 100755 index 0000000..e201d81 --- /dev/null +++ b/examples/hooks/beryl.sh @@ -0,0 +1,78 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install beryl and enable aiglx. +# It was originally written by Inigo Tejedor Arrondo <inigo@navarrux.org>. +# +# To enable it, copy this hook into your config/chroot_local-hooks directory. +# for forcing aiglx activation type at boot prompt "live forceaiglx" +# for forcing aiglx deactivation type "live noaiglx" + +# Importing archive signing key +wget -O - http://debian.beryl-project.org/root@lupine.me.uk.gpg | apt-key add - + +# Updating indices +apt-get update + +# Installing packages +PACKAGES="beryl beryl-core beryl-manager beryl-plugins beryl-settings beryl-settings-bindings beryl-settings-simple mesa-utils" + +dpkg -s gnome-core > /dev/null 2>&1 && PACKAGES="${PACKAGES} emerald emerald-themes heliodor" +dpkg -s kde-core > /dev/null 2>&1 && PACKAGES="${PACKAGES} aquamarine" + +apt-get install --yes ${PACKAGES} + +# Adding init script +cat > /etc/init.d/aiglx << EOF +#!/bin/sh +activate_3d() +{ + activate_aiglx + activate_beryl +} + +activate_aiglx() +{ + echo "" >> /etc/X11/xorg.conf + echo "# Added by beryl-hook.sh" >> /etc/X11/xorg.conf + echo "Section \"Extensions\"" >> /etc/X11/xorg.conf + echo " Option \"Composite\" \"Enable\"" >> /etc/X11/xorg.conf + echo "EndSection" >> /etc/X11/xorg.conf + + sed -i -e "s/Section \"Device\""/"Section \"Device\"\n\t Option \"XAANoOffscreenPixmaps\" \"true\"\n\t Option \"AddARGBGLXVisuals\" \"on\"\n\t Option \"AllowGLXWithComposite\" \"true\"/" -e "s/Section \"Module\""/"Section \"Module\"\n\t Load \"i2c\"\n\t Load \"int10\"\n\t Load \"xtrap\"\n\t Load \"vbe\"/" /etc/X11/xorg.conf +} + +activate_beryl() +{ + # http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html + ! [ -d /etc/xdg/autostart ] && mkdir -p /etc/xdg/autostart + +cat > /etc/xdg/autostart/beryl-manager.desktop << EOS +[Desktop Entry] +Encoding=UTF-8 +Name=Beryl Manager +GenericName=3D Window Manager +Comment=Beryl Manager daemon +Icon= +Exec=beryl-starter +Terminal=false +Type=Application +Categories= +EOS + +cat > /usr/local/bin/beryl-starter << EOS +#!/bin/sh +glxinfo > /dev/null 2>&1 && beryl-manager +EOS + +chmod 0755 /usr/local/bin/beryl-starter +} + +if ! cat /proc/cmdline | grep noaiglx > /dev/null +then + echo "Configuring xorg for aiglx..." + activate_3d +fi +EOF + +chmod 0755 /etc/init.d/aiglx +update-rc.d aiglx defaults diff --git a/examples/hooks/ipw2100.sh b/examples/hooks/ipw2100.sh new file mode 100755 index 0000000..fc9e033 --- /dev/null +++ b/examples/hooks/ipw2100.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ipw2100 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib" sections and the 686 flavour. +# +# e.g with make-live : --sections "main contrib" --kernel-flavour 686 + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant --non-inter --quiet auto-install ipw2100 +module-assistant clean ipw2100 + +# Installing firmware (http://ipw2100.sourceforge.net/firmware.php) +# grabbing 0.55 (Wed May 16 15:17:38 -- matth) +wget --referer "http://ipw2100.sourceforge.net/firmware.php" "http://ipw2100.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=ipw2100-fw-1.3.tgz" -O /tmp/ipw2100-fw-1.3.tgz + +cd /tmp +tar xfvz ipw2100-fw-1.3.tgz +mv ipw2100-1.3* /lib/firmware +rm -f ipw2100-fw-1.3.tgz +cd ${OLDPWD} diff --git a/examples/hooks/ipw2200.sh b/examples/hooks/ipw2200.sh new file mode 100755 index 0000000..fd2fc99 --- /dev/null +++ b/examples/hooks/ipw2200.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install nvidia-legacy drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib" sections and the 686 flavour. +# +# e.g with make-live : --sections "main contrib" --kernel-flavour 686 + +# Updating indices +apt-get update + +# Building kernel mdoule +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant --non-inter --quiet auto-install ipw2200 +module-assistant clean ipw2200 + +# Installing firmware (http://ipw2200.sourceforge.net/firmware.php) +# grabbing 3.0 (Wed May 16 15:17:38 -- matth) +wget --referer "http://ipw2200.sourceforge.net/firmware.php" "http://ipw2200.sourceforge.net/firmware.php?i_agree_to_the_license=yes&f=ipw2200-fw-3.0.tgz" -O /tmp/ipw2200-fw-3.0.tgz + +cd /tmp +tar xfvz ipw2200-fw-3.0.tgz +cp ipw2200-fw-3.0/*.fw /lib/firmware/ +rm -rf ipw2200-fw-3.0* +cd ${OLDPWD} diff --git a/examples/hooks/ipw3945.sh b/examples/hooks/ipw3945.sh new file mode 100755 index 0000000..04d235b --- /dev/null +++ b/examples/hooks/ipw3945.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ipw3945 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "non-free" sections +# +# e.g with make-live : --sections "main non-free" + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install ipw3945 # interactive mode for now +module-assistant clean ipw3945 + +apt-get install ipw3945d firmware-ipw3945 + +# hackish, autorun regulatory daemon, update-rc.d will reject that +ln -s /etc/init.d/ipw3945d /etc/rc2.d/S19ipw3945d diff --git a/examples/hooks/madwifi.sh b/examples/hooks/madwifi.sh new file mode 100755 index 0000000..f45b968 --- /dev/null +++ b/examples/hooks/madwifi.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install madwifi drivers +# To enable it, copy this hook into your config/chroot_localhooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "non-free" sections +# +# e.g with make-live : --sections "main non-free" + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install madwifi +module-assistant clean madwifi + +# Installing aditional stuff +apt-get install --yes madwifi-tools madwifi-doc diff --git a/examples/hooks/nvidia-legacy.sh b/examples/hooks/nvidia-legacy.sh new file mode 100755 index 0000000..cc1ceb4 --- /dev/null +++ b/examples/hooks/nvidia-legacy.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install nvidia-legacy drivers +# To enable it, copy this hook into your config/chroot_localhooks directory. + +# IMPORTANT: for apt-get to locate the required packages you need to +# add "contrib non-free" sections. +# +# e.g with make-live : --sections "main contrib non-free" + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant nvidia-kernel-common +module-assistant update +module-assistant --non-inter --quiet auto-install nvidia-kernel-legacy +module-assistant clean nvidia-kernel-legacy + +# Installing aditional stuff +apt-get install --yes nvidia-glx-legacy nvidia-xconfig discover + +# fixup (#421028) +if [ -f /usr/lib/xorg/modules/drivers/nvidia_drv.o ] +then + cd /usr/lib/xorg/modules/drivers + gcc -shared -o nvidia_drv.so nvidia_drv.o + cd ${OLDPWD} +fi + +# Adding init script +cat > /etc/init.d/nvidia-debian-live << EOF +#!/bin/sh +# script that modify xorg configuration enabling +# the nvidia proprietary module if the card is detected +# as an NVidia + +if discover --type-summary display | grep -i nvidia +then + # forcing depth to 24, bad detection on some card (e.g my GeForce4 440 Go) + echo "Configuring Xorg for nvidia ..." + nvidia-xconfig -d 24 +else + # not with nvidia h/w ? remove those GLX diversions + # (FIXME) + apt-get --quiet --yes remove nvidia-glx-legacy +fi +EOF + +chmod 0755 /etc/init.d/nvidia-debian-live +update-rc.d nvidia-debian-live defaults diff --git a/examples/hooks/rt2570.sh b/examples/hooks/rt2570.sh new file mode 100755 index 0000000..bbf79c1 --- /dev/null +++ b/examples/hooks/rt2570.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ralink rt2570 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel module +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install rt2570-source +module-assistant clean rt2570-source diff --git a/examples/hooks/rt2x00.sh b/examples/hooks/rt2x00.sh new file mode 100755 index 0000000..8c5153c --- /dev/null +++ b/examples/hooks/rt2x00.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install ralink rt2x00 drivers +# To enable it, copy this hook into your config/chroot_local-hooks directory. + +# NOTE: it runs in interactive mode + +# Updating indices +apt-get update + +# Building kernel modules +which module-assistant || apt-get install --yes module-assistant +module-assistant update +module-assistant auto-install rt2x00-source +module-assistant clean rt2x00-source + +# Installing firmware for rt73usb +wget "http://www.ralinktech.com.tw/data/RT73_Linux_STA_Drv1.0.4.0.tar.gz" -O /tmp/RT73_Linux_STA_Drv1.0.4.0.tar.gz + +cd /tmp +tar xfvz RT73_Linux_STA_Drv1.0.4.0.tar.gz +cp RT73_Linux_STA_Drv1.0.4.0/Module/rt73.bin /lib/firmware +rm -rf RT73_Linux_STA_Drv* +cd ${OLDPWD} diff --git a/examples/hooks/sun-java5.sh b/examples/hooks/sun-java5.sh new file mode 100755 index 0000000..987b0b2 --- /dev/null +++ b/examples/hooks/sun-java5.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install sun-java. +# +# To enable it, copy this hook into your config/chroot_local-hooks directory and +# don't forget to enable non-free in LIVE_SECTIONS. +# +# live-helper sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not +# ask any questions while installing packages. Suns redistribution terms for +# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for +# this apt-get call only. + +DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java5-bin sun-java5-demo \ + sun-java5-doc sun-java5-fonts sun-java5-jdk sun-java5-jre \ + sun-java5-plugin sun-java5-source diff --git a/examples/hooks/sun-java6.sh b/examples/hooks/sun-java6.sh new file mode 100755 index 0000000..f400b4d --- /dev/null +++ b/examples/hooks/sun-java6.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# This is a hook for live-helper(7) to install sun-java. +# +# To enable it, copy this hook into your config/chroot_local-hooks directory and +# don't forget to enable non-free in LIVE_SECTIONS. +# +# live-helper sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not +# ask any questions while installing packages. Suns redistribution terms for +# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for +# this apt-get call only. + +DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java6-bin sun-java6-demo \ + sun-java6-doc sun-java6-fonts sun-java6-jdk sun-java6-jre \ + sun-java6-plugin sun-java6-source |