I whole hardheartedly agree with Rick on this point.  That being said, yes, put the script in the shutdown sequence.  Inject it either first or where ever makes the most since. It has been awhile since I messed with this but I think you need to research manipulation of the rc.local directory files.  Hope it helps, just a pointer for you to look into.

regards,
-- Fred

On Wed, Sep 19, 2018 at 10:39 AM Rick Stevens <ricks@alldigital.com> wrote:
On 9/19/18 10:24 AM, Louis Garcia wrote:
> Is there a way to have fedora workstation to update on shutdown? When a
> user logs off or shutdown there box I would like fedora to pkcon update
> -y or dnf upgrade -y. I thought about creating a systemd unit file to do
> this but would that conflict with offline update?

I'm sure you could do something like that, but I'm absolutely not in
favor of unsupervised updates. There are times where updates can result
in an unbootable system or various other issues. Error messages would
not be visible during the upgrade, conflicts with packages from other
sources might be missed, many other things might end up with a system
that, even if it works, might behave rather differently than the system
you shut down before.

You only have to look at the number of "bricked" Winblows system
upgrades that have occurred in the past using this scheme. No,
unsupervised or unobserved updates are a bad idea IMHO. I never use "-y"
with dnf or pkcon or yum. I look at the proposed upgrades before I ever
approve them--and there are MANY times I've rerun the command with an
"--exclude=" so specific packages do NOT get upgraded.

You might disagree with much he did, but as Reagan said, "Trust, but
verify!"
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital    ricks@alldigital.com -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-          When all else fails, try reading the instructions.        -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org