Bug 1087950
| Summary: | nfs-utils should not enable itself | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Andy Lutomirski <luto> |
| Component: | nfs-utils | Assignee: | Steve Dickson <steved> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 22 | CC: | bfields, luto, marcosfrm, steved |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | nfs-utils-1.3.0-1.3.fc21 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-19 11:22:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1090684 | ||
|
Description
Andy Lutomirski
2014-04-15 16:55:38 UTC
Please move to the preset-enabled rpm macros: https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Macroized_scriptlets_.28Fedora_18.2B.29 Something like this:
diff --git a/nfs-utils.spec b/nfs-utils.spec
index 64e413c..a2e37d8 100644
--- a/nfs-utils.spec
+++ b/nfs-utils.spec
@@ -190,17 +190,10 @@ else
fi
%post
-if [ $1 -eq 1 ]; then
- /bin/systemctl enable nfs-client.target >/dev/null 2>&1 || :
- /bin/systemctl restart nfs-config >/dev/null 2>&1 || :
-else
- # Package upgrade
- /bin/systemctl reenable nfs-client.target >/dev/null 2>&1 || :
- /bin/systemctl restart nfs-config >/dev/null 2>&1 || :
- if /bin/systemctl --quiet is-enabled nfs-server ; then
- /bin/systemctl reenable nfs-server >/dev/null 2>&1 || :
- fi
-fi
+%systemd_post nfs-client.target
+%systemd_post nfs-config
+%systemd_post nfs-server
+
# Make sure statd used the correct uid/gid.
chown -R rpcuser:rpcuser /var/lib/nfs/statd
@@ -218,7 +211,7 @@ if [ $1 -eq 0 ]; then
fi
%postun
- %systemd_postun_with_restart nfs-server
+%systemd_postun_with_restart nfs-server
if [ $1 -ge 1 ]; then
/bin/systemctl try-restart nfs-client.target >/dev/null 2>&1 || :
/bin/systemctl try-restart nfs-server.target >/dev/null 2>&1 || :
Fixed in: nfs-utils-1.3.0-1.3.fc21 This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |