| Summary: | rc-local.service is not enabled and impossible to enable | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Denis Chupau <d.chupau> |
| Component: | RPM Packages | Assignee: | Colin Guthrie <mageia> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | mageia |
| Version: | 3 | ||
| Target Milestone: | --- | ||
| Hardware: | i586 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | systemd-units | CVE: | |
| Status comment: | |||
|
Description
Denis Chupau
2013-06-12 15:05:55 CEST
Sander Lepik
2013-06-12 17:02:27 CEST
CC:
(none) =>
sander.lepik It's not meant to be enabled by default, as there is a generator that ensures it is pulled into multi-user.target if /etc/rc.d/rc.local is executable. So adding an [Install] section is the wrong solution and if you read /usr/lib/systemd/system/rc-local.service it clearly states: # This unit gets pulled automatically into multi-user.target by # systemd-rc-local-generator if /etc/rc.d/rc.local is executable. So the question is, is /usr/lib/systemd/system-generators/systemd-rc-local-generator not working??? After booting what are the contents of /run/systemd/generator/ and more specifically does the folder /run/systemd/generator/multi-user.target.wants/ exist and does it have a symlink to rc-local.service in it? While this could be a bug that should be fixed, I should note that rc-local.service is a compatibility kludge. If you are creating new scripts to be run at boot, it would be better to write your own systemd units in /etc/systemd/system and enable them directly, especially if your "local" jobs do not have to be run sequentially, but can be run in parallel - in which case you can create several separate units for each of the jobs you want. For reference, testing the generator works fine for me: [root@plateau ~]# touch /etc/rc.d/rc.local [root@plateau ~]# chmod a+x !$ chmod a+x /etc/rc.d/rc.local [root@plateau ~]# ls /tmp/ gpg-B60Jfa/ gpg-g12qDu/ gpg-G2DaZq/ gpg-Swi3ea/ gpg-ZLGg3n/ [root@plateau ~]# /usr/lib/systemd/system-generators/systemd-rc-local-generator [root@plateau ~]# ls /tmp gpg-B60Jfa/ gpg-g12qDu/ gpg-G2DaZq/ gpg-Swi3ea/ gpg-ZLGg3n/ multi-user.target.wants/ [root@plateau ~]# ls -l /tmp/multi-user.target.wants/ total 0 lrwxrwxrwx 1 root root 40 Jun 12 16:44 rc-local.service -> /usr/lib/systemd/system/rc-local.service Ok, thanks ! But are there any documentations anywhere about the "/usr/lib/systemd/system-generators/systemd-rc-local-generator" Because I didn't find a page about this (either manpage or document on the web). So where users can get this information ? regards, Dag The generator is mostly an implementation detail and users shouldn't need to know about it. If they have an existing rc.local script or write a new one and reboot it should be run fine on the next boot. I'm still not sure why it doesn't work for you generally tho', so can you provide the answers to the questions asked in comment 2? Hi, Ok, this is old stuff, I don't know what happened then. I remember having rebooted, and rc.local didn't execute, so maybe I did some other mistake. I re-tested with a fresh install (MGA3 i586) : - created the /etc/rc.d/rc.local script, - chmod +x, - reboot : it worked flawlessly. It's working flawlessly since then. That's why I think I did some mistake somewhere in the first install. Sorry about this. May I close this bug then ? regards, Dag Cool, thanks for re-testing and glad it seems to be working as expected (i.e. magically without any user intervention!) And yes, lets close this one now :) Status:
NEW =>
RESOLVED |