On 07/08/2011 03:16 PM, Rob OpenSuSE wrote:
On 8 July 2011 18:31, Christian Boltz
wrote: 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.
That seems much neater! I prefer that suggestion to all the others so far. If it's a flag, then let's treat it like one, no parsing, no syntax errors etc
The only thing my proposal doesn't solve is if enabled or disabled should win if both exist
Outlaw it! Simply mv {en,dis}abled/foo.service and mv {dis,en}abled/foo.service, and rm a redundant option that agrees with the system default.
Not sure how you would set a default of disable all or enable all, create a file "all" or "*" in the enable or disable directory? Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU SUSE-IBM Software Integration Center LINUX Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org