eric Suppose both frontend files, networkmanager and connmand, are present on the system. When I execute 66 start network, which one does 66 pick, networkmanager or connmand? If the choice is made automatically, the user might not be aware of the selection.
For this, exit with an error. That's it. Ask to user to select it. Say that the network service has conflicting providers.
eric .First at all, when is the alias applied? At runtime or parse time?
At time of enablement of NetworkManager or conmannd. If neither is enabled and the network service is started, then 66 should complain of conflicting providers, and ask the user. Preferably give the user a list of providers.
eric How can we let the user decide which one to use? How can this be implemented?
Just let the user enable his service.
Again, if none is enabled, exit with error... asking the user.
eric How does the user see where the alias points?
66 status network
or whatever command-line interface.
eric How the user can change the target of the Alias?
66 disable conmannd && 66 enable NetworkManager
This way, things are simple.
eric Let say that the Provides key is made at parse time. Now, i do 66 enable networkmanager, a symlink call network will be created. Then i can do 66 start network. Now i do 66 enable connmand. What happen to the symlink? If i decide that the latest enabled service take precedence, when i enable connmand the network symlink is replaced and point now to the connmand service. So far so good but my networkmanager service is always enabled. So conflict here. That mean that Provides need to automatically add Conflicts, so when i do 66 enable connmand, the networkmanager need to be disabled automatically.
The one created earlier should be the dominating one. User will disable NetworkManager himself and enable conmannd if he needs alternate networking. This will reduce the possibility of changes done out of user's knowledge.
In your case, 66 enable conmannd
will exit with error, informing the user.
But if neither is enabled and 66 start network
is called, exit with error saying that network has conflicting providers.
OR
Support them as 'virtual'/'provider' services, with special options or commands. This is overly complex for you to support, so...