You are not logged in.
So I have this script scheduled to run at @reboot with cron. It is only supposed to run "pacman -Syu" and log the output. The problem is that the network interface does not appear to be up at this moment, even if it is when I log in. The script works when I use netctl to start my interface at the beginning of the script.
I suppose this is because cron jobs are executed before my interface is brought up. If it is indeed the case, is there a way to change this ?
Last edited by regor (2019-09-08 16:00:27)
Offline
So I have this script scheduled to run at @reboot with cron.
You'd be far better off with a systemd service, especially given that you need to depend on the network.
It is only supposed to run "pacman -Syu" and log the output.
This, however, is a horrible idea no matter how you start it. Updates should not be unattended, and occasionally require user intervention or response to a prompt.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yes, I would not normally do this, but in this case I need to as part of a school assignment. I have to write a script to update the system that automatically starts at boot and at an other arbitrary time.
I am going to try with systemd, and see if I can get something cleaner than this. Thank you for the fast answer.
EDIT: Problem solved with systemd.
Last edited by regor (2019-09-08 15:57:55)
Offline
regor,
In the future, please do us (and you) a favor. If you are working on an academic assignment, you are obligated to tell us up front. You will still get answers, and they will be answers; but it will allow us to tailor our responses to guide you, with no one being placed in the position of compromising academic ethics.
Edit: In no way implying that such a breach has occurred here. Just give us a heads-up.
Last edited by ewaller (2019-09-09 03:45:30)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline