| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# Inserts the SystemTap modules using staprun. |
| 4 |
|
| 5 |
. /etc/systemtap-params.conf |
| 6 |
|
| 7 |
# From here, we can access /run (or rather what it will link to), |
| 8 |
# but because $STAT_PATH is user-configurable, we're not guaranteed that |
| 9 |
# it will be /run. Regardless, we can't have access to the final |
| 10 |
# root so we make do and write to /run/systemtap anyway. The init |
| 11 |
# script will take care of moving the PID files to the real directory if |
| 12 |
# necessary. |
| 13 |
PIDDIR=/run/systemtap |
| 14 |
mkdir -p $PIDDIR |
| 15 |
|
| 16 |
for script in $ONBOOT_SCRIPTS; do |
| 17 |
eval opts=\$${script}_OPT |
| 18 |
if [ $LOG_BOOT_ERR -eq 1 ]; then |
| 19 |
$STAPRUN $opts $CACHE_PATH/$script.ko 2> $PIDDIR/$script.log |
| 20 |
else |
| 21 |
$STAPRUN $opts $CACHE_PATH/$script.ko |
| 22 |
fi |
| 23 |
done |
| 24 |
|