You are not logged in.
Pages: 1
I have downloaded, enabled cronie and set a cronjob:
su
systemctl enable cronie.service
crontab -e
@reboot /bin/pacman_syu.sh /bin/pacman_syu.sh:
#!/bin/bash
pacman -Syu --noconfirmI have checked the /var/log/pacman, and it seems like the command has been sent:
[2024-04-20T11:01:36+0300] [PACMAN] Running 'pacman -Syu --noconfirm'
[2024-04-20T11:01:36+0300] [PACMAN] synchronizing package listsThese show up until the next reboot or once I use pacman.
So it's not a problem with cron. Is updating at boot not possible? if so, why?
Last edited by greenPillow (2024-04-20 14:35:16)
Offline
maybe the network is not up ?
Desktop or server machine ?
A sleep 60s at the script beginning could be a workaround, better would be systemd unit which considers network online dependency.
Unattended upgrade with --noconfirm is not recommended. Be prepared for a not working/broken system.
Better would be: after your work is done, run the update script manually, e.g. once or twice a week, then reboot.
Offline
maybe the network is not up ?
Desktop or server machine ?
A sleep 60s at the script beginning could be a workaround, better would be systemd unit which considers network online dependency.Unattended upgrade with --noconfirm is not recommended. Be prepared for a not working/broken system.
Better would be: after your work is done, run the update script manually, e.g. once or twice a week, then reboot.
Good catch! Thanks. It works with 'sleep 60'. I haven't debugged much, but the process might have ended before the network was up like you said.
Why isn't it a good idea? Till now I haven't much paid attention when doing pacman -Syu manually other than in some occasions.
Why should I pay more attention to it and how could this lead to a broken system?
Offline
Why isn't it a good idea? Till now I haven't much paid attention when doing pacman -Syu manually other than in some occasions.
Why should I pay more attention to it and how could this lead to a broken system?
You are expected to read the Arch front page and perform any manual steps that may be required before or after an upgrade to avoid a broken upgrade. Similarly such messages may also be present in pacman's output.
Offline
Pages: 1