Bug 737047
Summary: | FIXED_IN_GIT: systemd fails to start the rc-local.service when /etc/rc.d/rc.local is a symlink | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Marek Goldmann <mgoldman> |
Component: | systemd | Assignee: | Lennart Poettering <lpoetter> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | harald, johannbg, kay, lpoetter, metherid, mschmidt, notting, plautrba, the.ridikulus.rat |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | systemd-36-3.fc16 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-09-30 18:53:14 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: |
Description
Marek Goldmann
2011-09-09 13:10:45 UTC
The test for executability of the file was added to rc-local.service because on most systems rc.local contains nothing and spawning the shell for it is a waste of time. So the idea is that initscripts should ship the file without the x bit and include a comment like: "Please 'chmod +x' this file if you want it to run on boot". ConditionFileIsExecutable behaves as documented in systemd.unit(5): ConditionFileIsExecutable= is similar to ConditionPathExists= but verifies whether a certain path exists, is a regular file and marked executable. Theoretically this could be changed to follow symlinks (s/lstat/stat/ in the implementation of CONDITION_FILE_IS_EXECUTABLE). An argument for the change can be that ConditionFileIsExecutable is used as a replacement for "test -x" (which does follow symlinks). But it would be a change in the documented behaviour. initscripts was changed to just not ship the file, period. See bug 734628. FYI - I would agree that it should be changed to follow the symlink. (In reply to comment #1) > The test for executability of the file was added to rc-local.service because on > most systems rc.local contains nothing and spawning the shell for it is a waste > of time. So the idea is that initscripts should ship the file without the x bit > and include a comment like: "Please 'chmod +x' this file if you want it to run > on boot". > > ConditionFileIsExecutable behaves as documented in systemd.unit(5): > > ConditionFileIsExecutable= is similar to ConditionPathExists= but verifies > whether a certain path exists, is a regular file and marked executable. > > Theoretically this could be changed to follow symlinks (s/lstat/stat/ in the > implementation of CONDITION_FILE_IS_EXECUTABLE). An argument for the change can > be that ConditionFileIsExecutable is used as a replacement for "test -x" (which > does follow symlinks). But it would be a change in the documented behaviour. Michal, In this case the condition name is misleading a bit because there are done additional checks other than checking for exec flag. IMHO this should be split into two conditions in that case: ConditionFileIsExecutable and ConditionFileIsRegular. (In reply to comment #2) > initscripts was changed to just not ship the file, period. See bug 734628. I am totally cool with that :) BTW, the bug # your provided is wrong. Sorry, bug 734268. Fixed in git. Should ConditionPathIsDirectory follow symlinks too? I don't think so. And if, we need to be careful here. We use it to find out if /var/run needs to be bind mounted or is already a symlink. The path tests now behave like test(1) with respect to following symlinks: http://cgit.freedesktop.org/systemd/commit/?id=8571962ca31a468959eedce26fda278587327ba5 ConditionPathIsSymbolicLink has been added to help var-run.mount and var-lock.mount: http://cgit.freedesktop.org/systemd/commit/?id=0d60602c3b4d4b65da672d75c6146f2ea4b27f88 systemd-36-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/systemd-36-2.fc16 Package systemd-36-2.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-36-2.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/systemd-36-2.fc16 then log in and leave karma (feedback). systemd-36-3.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report. |