Bug 469197
| Summary: | netfs dispatcher script wrongly returns exit status 1 | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Orion Poplawski <orion> |
| Component: | initscripts | Assignee: | Bill Nottingham <notting> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | dcbw, notting, rvokal, wtogami |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2008-11-03 21:38:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
It will also return 1 if NM brings up a new interface that is not the default route. 05-netfs is provided by initscripts Bill: dispatcher scripts don't get an indication of whether the device is the default device or not, but that's certainly something that I can add if needed. Realistically... do we care about the return code of the script? diff --git a/NetworkManager/dispatcher.d/05-netfs b/NetworkManager/dispatcher.d/05-netfs
index 46d4bb4..655c87a 100755
--- a/NetworkManager/dispatcher.d/05-netfs
+++ b/NetworkManager/dispatcher.d/05-netfs
@@ -4,13 +4,13 @@ export LC_ALL=C
if [ "$2" = "down" ]; then
/sbin/ip route ls | grep -q ^default || {
- [ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop
- }
+ [ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop || :
+ } && { :; }
fi
if [ "$2" = "up" ]; then
/sbin/ip -o route show dev "$1" | grep -q '^default' && {
- /sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start
- }
+ /sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start || :
+ } || { :; }
fi
This would solve it. Also would increase the line noise content of the script, which may or may not be a good thing.
That being said, slapping a 'exit 0' at the bottom is far simpler. Fixed in 8.85-1. |
Description of problem: Oct 29 11:35:35 test nm-dispatcher.action: Script '/etc/NetworkManager/dispatcher.d/05-netfs' exited with error status 1. 05-netfs does: if [ "$2" = "down" ]; then /sbin/ip route ls | grep -q ^default || { [ -f /var/lock/subsys/netfs ] && /etc/rc.d/init.d/netfs stop } fi if [ "$2" = "up" ]; then /sbin/ip -o route show dev "$1" | grep -q '^default' && { /sbin/chkconfig netfs && /etc/rc.d/init.d/netfs start } fi which will return exit status 1 on up and down if netfs is not enabled (probably not what we want). Not really sure how to fix this properly and only return the exit code of init.d/netfs if we run it. Version-Release number of selected component (if applicable): NetworkManager-0.7.0-0.11.svn4022.4.fc9.i386