From 828e7d1ebefeeaf152910ad61f928a2f65607509 Mon Sep 17 00:00:00 2001 From: spwhitton Date: Sun, 29 Apr 2018 16:27:55 +0000 Subject: we should factor out code in Grub.configured --- ....configured_for_any___47__etc__47__default_config.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn (limited to 'doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn') diff --git a/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn new file mode 100644 index 00000000..6a97f8fb --- /dev/null +++ b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn @@ -0,0 +1,15 @@ +It would be useful to have a property to set key value pairs in /etc/default configs. The code is in Grub.configured. I have not written a patch yet because I am not sure what the module should be called. Possibilities are: + + & EtcDefault.set "anacron" "ANACRON_RUN_ON_BATTERY_POWER" "no" + +or maybe + + & ConfFile.hasShellSetting "/etc/default/anacron" ("ANACRON_RUN_ON_BATTERY_POWER", "no") + +Or possibly both of these, with the former implemented in terms of the latter. + +Notes: + +* The use of a tuple for the last two parameters ensures that the property can be used infix. + +* I think this property should deduplicate the config key after setting it. I.e. after uncommenting and modifying ANACRON_RUN_ON_BATTERY_POWER it should remove any further ANACRON_RUN_ON_BATTERY_POWER settings further down the config. This allows a seamless transition from just using File.containsLine to add to the end of the file. -- cgit v1.2.3 From 75c4b6d9cff82a1184603426902f337adb03c016 Mon Sep 17 00:00:00 2001 From: spwhitton Date: Sun, 29 Apr 2018 16:28:06 +0000 Subject: signature --- ...actor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn') diff --git a/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn index 6a97f8fb..16c791cd 100644 --- a/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn +++ b/doc/todo/factor_out_Grub.configured_for_any___47__etc__47__default_config.mdwn @@ -13,3 +13,5 @@ Notes: * The use of a tuple for the last two parameters ensures that the property can be used infix. * I think this property should deduplicate the config key after setting it. I.e. after uncommenting and modifying ANACRON_RUN_ON_BATTERY_POWER it should remove any further ANACRON_RUN_ON_BATTERY_POWER settings further down the config. This allows a seamless transition from just using File.containsLine to add to the end of the file. + +--spwhitton -- cgit v1.2.3