diff options
author | Mario Izquierdo (mariodebian) <mariodebian@gmail.com> | 2007-04-26 09:14:40 +0000 |
---|---|---|
committer | Mario Izquierdo (mariodebian) <mariodebian@gmail.com> | 2007-04-26 09:14:40 +0000 |
commit | 36a1e1f939b315f4942ae480c1912a65e7e6bc27 (patch) | |
tree | fc53e1c9ef7fee8059ec301074d58caed392296a /hooks-addons/04debug | |
parent | 4330714cbe227a0d955881166de63b1dcd99d425 (diff) |
initramfs-tools-tcos
* Rename hooks-addons to numberHOOK to exec in order
* Make /var/cache/tcos/packages a dir with debian uncompressed packages
git-svn-id: http://tcosproject.org/svn/tcos/trunk/initramfs-tools-tcos@174 97557d6f-af72-4ac7-98cc-18709f36555f
Diffstat (limited to 'hooks-addons/04debug')
-rw-r--r-- | hooks-addons/04debug | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/hooks-addons/04debug b/hooks-addons/04debug new file mode 100644 index 0000000..4a8181e --- /dev/null +++ b/hooks-addons/04debug @@ -0,0 +1,38 @@ +# hooks addon DEBUG support +# need strace, lsmod and ldd wrapper + + +# for debug purposes +if [ $TCOS_DEBUG ]; then + + stat_before + + cpifexists /usr/sbin/iftop /usr/bin/ + mkdir -p $DESTDIR/lib/terminfo/l/ + cp -a /lib/terminfo/l/linux $DESTDIR/lib/terminfo/l/ + + mkdir -p $DESTDIR/lib/terminfo/x/ + cp -a /lib/terminfo/x/xterm* $DESTDIR/lib/terminfo/x/ + + cpifexists /bin/lsmod /usr/bin/ + cpifexists /usr/bin/strace /bin/ + cpifexists /sbin/mkfs /sbin/ + cpifexists /sbin/mkfs.vfat /sbin/ + cpifexists /sbin/mkfs.ext3 /sbin/ + + cat <<EOF > $DESTDIR/bin/ldd +#!/bin/sh +file=\$1 +if [ ! -f /\$1 ]; then + file=\$(which \$1) +fi +if [ ! -e \${file} ]; then + echo "\${file} not found" + exit 1 +fi +/lib/ld-linux.so.2 --list \$file +EOF + chmod +x $DESTDIR/bin/ldd + + stat_after "Debug tools" +fi # end of TCOS_DEBUG |