Mailinglist Archive: opensuse-bugs (4919 mails)

< Previous Next >
[Bug 588679] yast2-printer: AutoYaST client destroys information in cupsd.conf
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 16 Mar 2010 16:27:19 +0000
  • Message-id: <20100316162719.073EF24551E@xxxxxxxxxxxxxxxxxxxxxx>
http://bugzilla.novell.com/show_bug.cgi?id=588679

http://bugzilla.novell.com/show_bug.cgi?id=588679#c4


--- Comment #4 from Johannes Meixner <jsmeix@xxxxxxxxxx> 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.

< Previous Next >
References