Hi,
I've been pulling my hair out for hours trying to get something so simple to work. Here's what I've done:
1. Created /etc/init.d/reboot-report with permissions -rwxr-xr-x
I shouldn't have to have the case statement, because the script should just run on shutdown, not having a start/stop state. Just did it anyway because it wasn't working without it, so I tried that.
2. update-rc.d didn't create the symlink, so in /etc/rc6.d/, I manually created:
This has full permissions of lrwxrwxrwx.
---
I read about needing a lock file at /var/lock/subsys/reboot-report. Shouldn't need it, because the script doesn't have a state. It should just run once on shutdown. Regardless, I created an empty file there with touch, but the script still didn't run on reboot. The file disappeared once the machine rebooted.
I did the same for shutdown-report in rc0.d. Doesn't work either.
Any help would be greatly appreciated - my patience is wearing very thin with this.
I've been pulling my hair out for hours trying to get something so simple to work. Here's what I've done:
1. Created /etc/init.d/reboot-report with permissions -rwxr-xr-x
Code:
#!/bin/sh
start()
{
/var/www/html/logging/reboot-report
echo "test3\n" > /var/www/html/logging/debug
}
case "$1" in
start)
start
;;
esac
I shouldn't have to have the case statement, because the script should just run on shutdown, not having a start/stop state. Just did it anyway because it wasn't working without it, so I tried that.
2. update-rc.d didn't create the symlink, so in /etc/rc6.d/, I manually created:
Code:
S00reboot-report -> ../init.d/reboot-report
This has full permissions of lrwxrwxrwx.
---
I read about needing a lock file at /var/lock/subsys/reboot-report. Shouldn't need it, because the script doesn't have a state. It should just run once on shutdown. Regardless, I created an empty file there with touch, but the script still didn't run on reboot. The file disappeared once the machine rebooted.
I did the same for shutdown-report in rc0.d. Doesn't work either.
Any help would be greatly appreciated - my patience is wearing very thin with this.