diff options
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/busybox | 31 | ||||
-rwxr-xr-x | hooks/keymap | 11 | ||||
-rwxr-xr-x | hooks/klibc | 24 | ||||
-rwxr-xr-x | hooks/thermal | 3 |
4 files changed, 67 insertions, 2 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/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/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 |