home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
root
/
usr
/
share
/
YaST2
/
clients
/
inst_fam.ycp
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
75 lines
/**
* File: clients/inst_fam.ycp
* Package: installation
* Summary: Configure FAM according to control file and defauls WM
* Authors: Jiri Srain <jsrain@suse.cz>
*
* $Id: inst_fam.ycp 23016 2005-04-18 13:20:13Z jsrain $
*
*/
{
textdomain "installation";
import "ProductFeatures";
import "ProductControl";
import "Mode";
import "Service";
import "GetInstArgs";
/**
* Is GNOME installed?
* @return true if it is
*/
boolean GnomeInstalled () {
return Pkg::IsProvided ("gnome-session");
}
/**
* Is KDE installed?
* @return true if it is
*/
boolean KdeInstalled () {
return Pkg::IsProvided ("kdebase3");
}
/* Called backwards */
if(GetInstArgs::going_back())
return `auto;
if ( !Mode::update () )
{
string default_wm = (string)
SCR::Read (.sysconfig.windowmanager.DEFAULT_WM);
if (SCR::Read (.target.size, ("/etc/sysconfig/fam")) != -1)
{
y2milestone ("Default WM: %1", default_wm);
string local_only = ProductFeatures::GetStringFeature (
"globals", "fam_local_only");
y2milestone ("Fam activation: %1", local_only);
if (local_only == "always"
|| local_only == default_wm
|| (local_only == "gnome" && GnomeInstalled ())
|| (local_only == "kde" && KdeInstalled ()))
{
y2milestone ("Setting fam to local_only");
SCR::Write (.sysconfig.fam.FAM_LOCAL_ONLY, "yes");
SCR::Write (.sysconfig.fam, nil);
Service::Enable ("fam");
}
}
// FIXME IT IS NOT YAST's TASK TO CREATE ENVIRONMENT FOR DESKTOPS THIS
// WAY. See bug 72018.
if (Pkg::IsProvided ("netapplet"))
{
if (default_wm == "gnome")
{
Service::Enable ("netdaemon");
}
}
}
return `auto;
}