Commit 1be3859
committed
docker: guard auto-pull cronjob write, don't chmod a missing file
docker_setup_auto_pull_cronjob ran 'sudo chmod 600' on the cron file
unconditionally, even when the preceding 'sudo tee' failed to create it —
producing 'chmod: cannot access /etc/cron.d/armbian-docker-pull: No such
file or directory'. The wrapper-script write just above already guards its
tee and bails gracefully; the cron-file write did not.
Guard the cron tee the same way: on failure, warn and return (best-effort,
the feature is opt-in via ARMBIAN_DOCKER_AUTO_PULL), and only chmod when
the file was actually created.
Signed-off-by: Igor Pecovnik <igor@armbian.com>1 parent 8dc413c commit 1be3859
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
905 | 905 | | |
906 | 906 | | |
907 | 907 | | |
908 | | - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
909 | 914 | | |
910 | | - | |
911 | | - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
912 | 920 | | |
913 | 921 | | |
914 | 922 | | |
| |||
0 commit comments