summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/busybox31
-rwxr-xr-xhooks/kernelextras44
-rwxr-xr-xhooks/keymap11
-rwxr-xr-xhooks/klibc24
-rwxr-xr-xhooks/legacylvm28
-rwxr-xr-xhooks/thermal3
-rwxr-xr-xhooks/udevhelper36
7 files changed, 67 insertions, 110 deletions
diff --git a/hooks/busybox b/hooks/busybox
new file mode 100755
index 0000000..1a275b7
--- /dev/null
+++ b/hooks/busybox
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# busybox
+if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
+ # those root need busybox
+ eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')"
+ if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then
+ echo "W: Busybox is required for successful boot!"
+ fi
+else
+ . /usr/share/initramfs-tools/hook-functions
+ rm -f ${DESTDIR}/bin/sh
+ rm -f ${DESTDIR}/bin/busybox
+ copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+ ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh
+fi
diff --git a/hooks/kernelextras b/hooks/kernelextras
deleted file mode 100755
index 714e9a9..0000000
--- a/hooks/kernelextras
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-PREREQ=""
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-# Hooks for loading extra kernel bits into the initramfs
-
-. /usr/share/initramfs-tools/hook-functions
-
-fbcon=n
-
-for x in ${MODULESDIR}/initrd/*; do
- x=${x##*/}
- x=${x%.*}
- case ${x} in
- '*')
- break
- ;;
- *fb)
- fbcon=y
- ;;
- esac
-
- force_load ${x}
-done
-
-# And add vga16fb for usplash to use as well
-manual_add_modules vga16fb
-
-if [ ${fbcon} = "y" ]; then
- force_load fbcon
-fi
diff --git a/hooks/keymap b/hooks/keymap
index a2b1b08..fa97209 100755
--- a/hooks/keymap
+++ b/hooks/keymap
@@ -21,13 +21,20 @@ if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then
fi
# Step 1 - Basic tools
-if [ ! -x /bin/loadkeys ] || [ ! -r /etc/console/boottime.kmap.gz ]; then
+if [ ! -x /bin/loadkeys ] ||
+! ( [ -r /etc/console/boottime.kmap.gz ] \
+ || [ -r /etc/console-setup/cached.kmap.gz ] ); then
exit 0
fi
. /usr/share/initramfs-tools/hook-functions
copy_exec /bin/loadkeys /bin
-cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
+
+if [ -e /etc/console-setup/cached.kmap.gz ]; then
+ cp /etc/console-setup/cached.kmap.gz ${DESTDIR}/etc/boottime.kmap.gz
+else
+ cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
+fi
# Step 2 - Check for UTF8 console
if [ ! -x /usr/bin/kbd_mode ]; then
diff --git a/hooks/klibc b/hooks/klibc
new file mode 100755
index 0000000..e41c631
--- /dev/null
+++ b/hooks/klibc
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+PREREQ=""
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+# klibc
+ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin
+ln -s /lib/klibc-*.so ${DESTDIR}/lib
+rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/zcat
+if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then
+ mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh
+fi
diff --git a/hooks/legacylvm b/hooks/legacylvm
deleted file mode 100755
index 9121f90..0000000
--- a/hooks/legacylvm
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-PREREQ=""
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-# FIXME: Remove this hook after Lenny releases
-. /usr/share/initramfs-tools/hook-functions
-
-if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \
- && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then
- copy_exec /lib/lvm-200/vgchange /sbin
- for x in dm_mod dm_snapshot dm_mirror; do
- manual_add_modules ${x}
- done
-fi
-exit 0
diff --git a/hooks/thermal b/hooks/thermal
index ece7243..aa10ebf 100755
--- a/hooks/thermal
+++ b/hooks/thermal
@@ -22,6 +22,9 @@ esac
case "$DPKG_ARCH" in
# copy the right modules
powerpc|ppc64)
+ if [ -e /sys/bus/ps3_system_bus/ ]; then
+ exit 0
+ fi
manual_add_modules therm_pm72
manual_add_modules windfarm_core
manual_add_modules windfarm_cpufreq_clamp
diff --git a/hooks/udevhelper b/hooks/udevhelper
deleted file mode 100755
index f86e4af..0000000
--- a/hooks/udevhelper
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-# FIXME: kill after lenny release
-# needed for UUID root and partial etch upgrades
-#
-PREREQ="udev"
-
-prereqs()
-{
- echo "$PREREQ"
-}
-
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
-esac
-
-. /usr/share/initramfs-tools/hook-functions
-
-# should never happen
-if [ ! -e $DESTDIR/lib/udev/ ]; then
- exit 0
-fi
-
-# fixed udev hook
-if [ -e $DESTDIR/lib/udev/ ] && [ -e $DESTDIR/lib/udev/hotplug.functions ]; then
- exit 0
-fi
-
-cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/
-for program in /lib/udev/*_id; do
- copy_exec $program /lib/udev/
-done
-exit 0