I have a script that ran on 9.3 for years in the crontab but on 11.3 it won't run at startup. The command still works as tested in the shell with: env -i SHELL=/bin/sh PATH=" using cut and past so no typo's. It still works but the "conf/base/etc/crontab" doesn't seem to load it.
To modify the crontab I used:
1 - # mount -o rw /dev/ufs/FreeNASs1a /
2 - # nano /conf/base/etc/crontab
Then in nano entered the path:
3- @Reboot root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/USB3/lable.sh > /dev/null
4- Then Ctrl O and Ctrl X to write out and exit.
Crontab at /conf/base/etc/crontab reflects the change:
#
*/5 * * * * root /usr/libexec/atrun
#
@Reboot root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/USB3/lable.sh > /dev/null
# Save some entropy so that /dev/random can re-seed on boot.
*/11 * * * * operator /usr/libexec/save-entropy
#
I think from memory it's also supposed to reflect in "/etc/crontab" but it's not. If I'm right and it's supposed to reflect how do I do it for I don't remember doing anything else all those years ago.
Help!
For the curious. Unless things have changed it has to be done this way for the script is needed at startup and needs to keep running until it shuts itself down so standard cron or init won't work,
To modify the crontab I used:
1 - # mount -o rw /dev/ufs/FreeNASs1a /
2 - # nano /conf/base/etc/crontab
Then in nano entered the path:
3- @Reboot root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/USB3/lable.sh > /dev/null
4- Then Ctrl O and Ctrl X to write out and exit.
Crontab at /conf/base/etc/crontab reflects the change:
#
*/5 * * * * root /usr/libexec/atrun
#
@Reboot root PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin" /mnt/USB3/lable.sh > /dev/null
# Save some entropy so that /dev/random can re-seed on boot.
*/11 * * * * operator /usr/libexec/save-entropy
#
I think from memory it's also supposed to reflect in "/etc/crontab" but it's not. If I'm right and it's supposed to reflect how do I do it for I don't remember doing anything else all those years ago.
Help!
For the curious. Unless things have changed it has to be done this way for the script is needed at startup and needs to keep running until it shuts itself down so standard cron or init won't work,