Page 1 of 1

Crontab reset at boot?

Posted: Fri Feb 19, 2021 9:10 pm
by sedilson
Greetings fellows.

Code: Select all

Gargoyle version 1.12.0   | OpenWrt 18.06 branch               |
Gargoyle revision d8b3cc58| OpenWrt commit 5e4533c
Built December 01, 2019   | Target  ar71xx/ath10k-large
Archer_C7
I noticed that my cronjobs are removed from crontabs at reboot.
To confirm, I have used chattr +i to block root file and reboot. Once taking a look at logread I see:

Code: Select all

Fri Feb 19 21:41:33 2021 daemon.notice procd: /etc/rc.d/S30set_kernel_timezone: touch: /etc/crontabs/root: Operation not permitted
Fri Feb 19 21:51:39 2021 daemon.notice procd: /etc/rc.d/S85webmon_gargoyle: touch: /etc/crontabs/root: Operation not permitted
Fri Feb 19 21:51:39 2021 daemon.notice procd: /etc/rc.d/S85webmon_gargoyle: mv: can't remove '/etc/crontabs/root': Operation not permitted
But why?

Re: Crontab reset at boot?

Posted: Fri Feb 19, 2021 9:16 pm
by Lantis
What are you trying to achieve?

Yes the crontab is modified dynamically during normal operation by several parts of Gargoyle.
This should not affect any user added ones unless they are the same/similar to regular Gargoyle operations.

Re: Crontab reset at boot?

Posted: Fri Feb 19, 2021 11:02 pm
by sedilson
I just want that the commands I include on crontab -e persist which is not happening. After some days they are removed somehow from crontab.
Investigating I found that other process changes the file at boot.

Re: Crontab reset at boot?

Posted: Sat Feb 20, 2021 2:36 am
by Lantis
Can you provide examples of the commands you are adding? There is only a few possibilities for them to disappear:
1. Your router is full and it is in read-only temporary storage mode
2. You're using commands which are too similar to Gargoyle native cronjobs and are being overwritten

I can't evaluate the 2nd one without you telling me exactly what you're trying to achieve.