|
Bugzilla – Full Text Bug Listing |
| Summary: | Network.service entered failed state because of syntax error | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Marcus Husar <marcus.husar> |
| Component: | Network | Assignee: | Marius Tomaschewski <mt> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P2 - High | CC: | fcrozat, marcus.husar |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | SUSE Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
The route for the IPv4 default gateway configured in yast.
The output of "route -n". The output of "systemctl status network.service". Parts of /var/log/messages with error messages. Patch disabling posix mode that may be set in profile |
||
Created attachment 469568 [details]
The output of "route -n".
There should be a row for the IPv4 default gateway. One may add it by "route add default gw xxx.xxx.133.1".
Created attachment 469571 [details]
The output of "systemctl status network.service".
Created attachment 469572 [details]
Parts of /var/log/messages with error messages.
I found the source of the problem. /etc/init.d/network and /etc/init.d/network-remote are started by systemd which uses /bin/sh (not /bin/bash!). But the scripts sourced by those LSB scripts have some bash only syntax. Possible solutions: * Rewrite the scripts in /etc/sysconfig/network/scripts/ to /bin/sh * Allow systemd to use bash Just source some scripts in this directory, e.g. functions, ifstatus-route, ifup-route,… out of /bin/sh. There are exactly the same syntax errors as in systemd. So systemd just runs /bin/sh. I bet these syntax errors are causing this bug #739345, too. Thanks for your help. where did you found systemd is using /bin/sh ? systemd is using execve, not a call to /bin/sh. If /bin/sh is called somewhere, it is probably by the #! of a called script. The network scripts need and always needed a bash to enable features like
support of constructs like e.g.:
a=""
while ... do ... a=x;... done < <(command)
echo $a
regex matches, ... and is always using #!/bin/bash, that is used in every
network script we ship in sysconfig.
*** This bug has been marked as a duplicate of bug 587428 ***
*** Bug 739345 has been marked as a duplicate of this bug. *** Going to add unset POSIXLY_CORRECT ; set +o posix at the begin of the scripts. Created attachment 470335 [details]
Patch disabling posix mode that may be set in profile
This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/99577 12.1 / sysconfig This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/99585 12.1 / sysconfig This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/99593 11.4 / sysconfig https://build.opensuse.org/request/show/99595 11.3 / sysconfig fixed & submitted. This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/105293 Factory / sysconfig This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/105749 Evergreen:11.2 / sysconfig This is an autogenerated message for OBS integration: This bug (739338) was mentioned in https://build.opensuse.org/request/show/106448 Evergreen:11.2 / sysconfig |
Created attachment 469567 [details] The route for the IPv4 default gateway configured in yast. User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.16) Gecko/20111108 Iceweasel/3.5.16 (like Firefox/3.5.16) Systemd unit network.service (/etc/init.d/network) fails to start properly because of syntax error in /etc/sysconfig/network/scripts/functions. I’ll attach parts of logfiles, error messages, and the routing table. Please ask if more information is needed. Reproducible: Always Steps to Reproduce: 1. Reboot system or systemctl restart network.service 2. Look into /var/log/messages Actual Results: Everything seems to be fine. The problem is that the service fails and I get lots of error messages. Also the routing table misses an entry for the default gateway. So I have no network access. Maybe that is a consequence of this bug, but I think it is a different bug that I will file in a few minutes. Expected Results: Network service starts without errors and server is online.