blob: 0d2456631d8321a23504ed78957d4fc673e751d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
# hooks addon DEBUG support
# need strace, lsmod and ldd wrapper
# for debug purposes
if [ ! $TCOS_DEBUG_TOOLS ]; then
_verbose "(04debug) TCOS_DEBUG_TOOLS disabled"
else
stat_before
mkdir -p $DESTDIR/lib/terminfo/l/
mkdir -p $DESTDIR/lib/terminfo/x/
cp -a /lib/terminfo/l/linux $DESTDIR/lib/terminfo/l/
cp -a /lib/terminfo/x/xterm* $DESTDIR/lib/terminfo/x/
[ -e /usr/sbin/iftop ] && cpifexists /usr/sbin/iftop /usr/bin/
cpifexists /bin/lsmod /usr/bin/
[ -e /usr/bin/strace ] && cpifexists /usr/bin/strace /usr/bin/
cpifexists /sbin/mkfs /sbin/
cpifexists /sbin/mkfs.vfat /sbin/
cpifexists /sbin/mkfs.ext3 /sbin/
stat_after "Debug tools"
fi # end of TCOS_DEBUG_TOOLS
cat <<EOF > $DESTDIR/bin/ldd
#!/bin/sh
file=\$1
if [ ! -f /\$file ]; then
file=\$(which \$file)
fi
if [ ! -e \${file} ]; then
echo "\${file} not found"
exit 1
fi
`ldd /sbin/mkfs | awk '/ld-linux/{print $1}'` --list \$file
EOF
chmod +x $DESTDIR/bin/ldd
|