-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
samba: remove redundant dependency on network.target #73061
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though #41841 didn't fix the autostart issue, ordering samba after network.target
does make a lot of sense:
network.target
This unit is supposed to indicate when network functionality is available, but it is only very weakly defined
what that is supposed to mean, with one exception: at shutdown, a unit that is ordered after network.target
will be stopped before the network — to whatever level it might be set up then — is shut down. It is hence
useful when writing service files that require network access on shutdown, which should order themselves
after this target, but not pull it in. Also see Running Services After the Network is up[1] for more
information. Also see network-online.target described above.
So this revert should not be merged.
Can you provide a testcase showing the problem? I couldn't get the samba nixos test to fail, so would assume it might be a local service misconfiguration, for example binding on ip adresses there yet.
@flokli this code
already adds Results samba-smbd.service:
|
Rechecking the configuration |
Correct work with this custom configuration
I don’t know how to add it here nixpkgs/nixos/modules/services/network-filesystems/samba.nix Lines 237 to 246 in a8b2e30
|
@flokli
|
You meant to say that
That's indeed correct, so the
I however don't understand your last 3 comments, sorry. I'm fine to merge this PR, if we change the commit message to explain the redundancy. WDYT? |
Yes. How to correctly rename PR? |
If add to my configuration
when the startup OS, the samba service works. |
This reverts commit 679d5e8. Services samba-smbd, samba-nmbd and samba-winbind are part of samba.target, which already has an After=network.target
Thanks! Can you open another PR adding above change
to the samba module? |
@flokli if i can rewrite the module. |
@Izorkin no need to rewite entirely ;-) I'd suggest to extend the |
This reverts commit 679d5e8.
Motivation for this change
This change not fixed autostart samba service - #41841 (comment)
cc @joachifm
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @