On 16/08/17 12:36 PM, Per Jessen wrote:
Per Jessen wrote:
Right. daemon-reload should be sufficient I believe.
https://www.freedesktop.org/software/systemd/man/systemd-fstab-generator.htm...
"systemd-fstab-generator is a generator that translates /etc/fstab (see fstab(5) for details) into native systemd units early at boot and when configuration of the system manager is reloaded."
I tried this on leap42.3 - added the following to fstab:
/tmp/anton.iso /tmp/anton iso9660 loop,noauto,x-systemd.automount,x-systemd.idle-timeout=60,nofail 0 0
Then I ran 'systemctl daemon-reload'
At that point there should have been a new dot-mount file come into existence under /run/systemd/generator You could run a before and after find listing to see if that happened. To my mind that is the most meaningful test to see if the generator ran. Secondly, there is a much more basic test you could have run as a precursor. Create new STATIC mount. If after running just reload files under that mount point are now available, then not only did the the generator run, but the mechanism that mounts the unit files (see a raw 'systemctl' listing) was run on it also did. That is a simple to test to see if the basic mounting mechanism reexec'd and was applied without running a 'systemctl reexec'. In the list of what subsequently happened that is an import test along the way.
# systemctl | grep automount proc-sys-fs-binfmt_misc.automount
Unfortunately that is not meaningful information. It was running before, it was running afterwards. You do not know if it is the same instance or a newly exec'd instance. You weren't running it with extra debugging or logging to see what it actually did. You don't know that it read the new config files. I don't see on the man8 page that there's a SIGCHLD option for force a re-read of the maps.
Then I ran 'systemctl daemon-reexec'
# systemctl | grep automount proc-sys-fs-binfmt_misc.automount
Remarkably, it took a reboot:
# systemctl | grep automou proc-sys-fs-binfmt_misc.automount tmp-anton.automount
The best I can figure is that neither reload no reexec actually ends up restarting the automounter. Since, as I say, there doesn't seem to be a SIGCHLD to force a reread at the deamon, its going to take the restart. You might have tried "systemctl stop autofs; systemctl start autofs" I think that's right. Hmmm When I look at /usr/lib/systemd/system/autofs.service I see the line ExecReload=/usr/bin/kill -HUP $MAINPID Oh! I missed that in the man8 page. MY BAD! So there you have another option systemctl reload autofs -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org