Re: Display a message on the console while upgrading a package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/30/21 1:17 PM, Robert Marcano wrote:
On 3/30/21 1:11 PM, Robert-André Mauchin wrote:
Hello,

Following a change in the config file of a program, I'd like to display a message to my users to indicate they need to update the config file with the new one. I try "echo" in the update scriptlet:

%postun
if [ "$1" -ge "1" ] ; then # Upgrade
   dnscrypt-proxy -service install --config %{_sysconfdir}/dnscrypt-proxy/dnscrypt-proxy.toml    echo 'Since version 2.0.45, some of the configuration files have been renamed.    Please merge your config to /etc/dnscrypt-proxy/dnscrypt-proxy.toml.rpmnew then
   replace dnscrypt-proxy.toml with that file.
   Read /usr/share/doc/dnscrypt-proxy/ChangeLog to merge files accordingly.'
fi

But it doesn't work as expected. Is there a way to transmit that message to my users?

The automatic message about the saving of the new configuration as an *.rpmnew file should tell any sysadmins that the configuration needs to be revised.


Let me add that DNF should show the list of configuration files saved as *.rpmsave or *.rpmnew at the end of the transaction. It is easy to skip those messages inside a long list of lines with ######################## as progress bars

If the service doesn't works fine with the old configuration. Maybe you could add a service ExecStartPre script that fails with a pretty message about the file migration required.



Best regards,

Robert-André
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux