/usr/share/tcos/hooks-addons/23bootchart is in initramfs-tools-tcos 0.89.86.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 44 45 | # must export this variable from shell no config yet
if [ "$TCOS_ENABLE_BOOTCHARTD" = "1" ]; then
cpifexists $TCOS_BINS/tcos-bootchartd /sbin
cpifexists /bin/sleep /bin
cat << EOF > $DESTDIR/sbin/bootlogger
#!/bin/sh
cmd="\$1"
logfile="\$2"
while [ -f "/tmp/bootchart.lock" ]; do
# Write the time (in jiffies).
read uptime < /proc/uptime
uptime=\${uptime%% [0-9]*}
uptime=\${uptime%.*}\${uptime#*.}
echo \$uptime
# Log the command output
eval \$cmd 2>/dev/null
echo
/bin/sleep 0.2
done >> "\$logfile"
EOF
chmod +x $DESTDIR/sbin/bootlogger
cat << EOF > $DESTDIR/scripts/init-top/000bootchartd
#!/bin/sh
#
if [ "\$1" = "prereqs" ]; then
exit 0
fi
if grep -q bootchartd /proc/cmdline ; then
/sbin/daemonize.sh /sbin/tcos-bootchartd start
fi
EOF
chmod +x $DESTDIR/scripts/init-top/000bootchartd
fi
|