Re: dnf install removes /etc/systemd/system/multi-user.wants/myservice.target symlink

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

 





On 7 Feb 2022, at 19:19, Kevin P. Fleming <kpfleming@xxxxxxxxxx> wrote:


Slightly off-topic, but I think it's relevant:

If 'myservice' and 'ods-prx' are referring to the same thing, I think you're supposed to use 'systemctl preset' instead of 'systemctl enable'. This allows the admin to decide whether the installed service/target/timer/etc. should be enabled during package installation. I recently learned about this feature and am using it to good effect on my own systems to stop packages from auto-starting the services they install :-)

Yes myservice and ods-prx are the same.

Yes preset is nice providing defaults for the admin.

But this is for production system and it must be symlinked.

Are you saying that there is code in dnf/rpm that is undoing the symlinking
becuase the preset is not in place?

Barry


On Mon, Feb 7, 2022 at 1:55 PM Barry Scott <barry@xxxxxxxxxxxxxxxx> wrote:
This is not for a package in Fedora, its for a package I'm
working on for Oracle Linux 8.

I install /usr/lib/systemd/system/myservice.target
that has:

[Install]
WantedBy=multi-user.target

In %post I run this:

ls -l /etc/systemd/system/multi-user.target.wants
/usr/bin/systemctl --no-reload enable ods-prx.target
ls -l /etc/systemd/system/multi-user.target.wants
echo "Info: post done"

When I dnf install myservice I see that the symlink is
setup from the ls -l output in the %post section.

But later in the output I see this line:

Info: post done

  Running scriptlet: myservice-2022.1-20220207180603.noarch
Removed /etc/systemd/system/multi-user.target.wants/myservice.target.

Is this expected?

How can I stop this happening?

If its not expected how can I pull apart the RPM to find the code that is running?

Barry


_______________________________________________
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
_______________________________________________
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