Hello, on Freitag, 8. Juli 2011, Robert Schweikert wrote:
OK, did not know that and was not part of the original message. Well, using numbers works, still leaves one parsing all files for a specific service and then figuring out which one is processed last and wins. Allowing only one file or enable/disable pair of files makes that task a lot easier.
There is another way that can even avoid reading file contents ;-) I propose to use two subdirectories "enabled" and "disabled", and then just put empty files there, with filename = service name. In other words: "touch disabled/cupsd.service" would mean cupsd is disabled by default, and "touch enabled/sshd.service" would enable sshd by default. The default behaviour (if there is no service-specific default set) could also stored with this method - just "touch enabled/DEFAULT". Advantages of this method: - you know exactly which files you have to check for a service - just check for disabled/$service_name and enabled/$service_name. - getting a full list for all services should be fast because you only have to read the content of two directories, not any file content. - easy to handle in packaging - you'll never have any problems with invalid syntax inside the config files ;-)) - you'll never get headache with file ordering The only thing my proposal doesn't solve is if enabled or disabled should win if both exist - but this issue exists in all proposals I've seen until now. It's probably something that should be (or already is) hardcoded in systemd. Regards, Christian Boltz -- What are you doing?!? The message is over, GO AWAY! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org