http://bugzilla.novell.com/show_bug.cgi?id=588679
http://bugzilla.novell.com/show_bug.cgi?id=588679#c4
--- Comment #4 from Johannes Meixner 2010-03-16 16:27:18 UTC ---
Implemented it right now as follows in printer_auto.ycp
for a very first test
-----------------------------------------------------------------------------
else if (func == "Export")
{ ret = $[ "cupsd_conf_content" :
$[ "file_contents" :
(string)SCR::Read( .target.string, "/etc/cups/cupsd.conf" )
],
"client_conf_content" :
$[ "file_contents" :
(string)SCR::Read( .target.string, "/etc/cups/client.conf" )
]
];
}
..
else if (func == "Write")
{ y2milestone("Writing to system '%1'", Printer::autoyast_printer_settings);
SCR::Write( .target.string,
"/etc/cups/cupsd.conf",
Printer::autoyast_printer_settings["cupsd_conf_content",
"file_contents"]:""
);
SCR::Write( .target.string,
"/etc/cups/client.conf",
Printer::autoyast_printer_settings["client_conf_content",
"file_contents"]:""
);
return true;
}
-----------------------------------------------------------------------------
and - guess what - it seems to work perfectly - at least for me!
I have both an easy to understand XML and no longer destroyed
information or any other unexpected change of my config files
and furthermore much less code which implements this all.
KISS!
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.