[yast-commit] r49321 - in /trunk/firstboot: ./ doc/ package/ src/ src/data/
Author: jsuchome
Date: Tue Jul 22 13:13:05 2008
New Revision: 49321
URL: http://svn.opensuse.org/viewcvs/yast?rev=49321&view=rev
Log:
- addedd support fot autoyast (fate#301946):
client for firstboot enablement
configurable path to firstboot.xml
adapted documentation
- 2.17.1
Added:
trunk/firstboot/src/firstboot_auto.ycp (with props)
Modified:
trunk/firstboot/VERSION
trunk/firstboot/doc/firstboot-section_mod.xml
trunk/firstboot/package/yast2-firstboot.changes
trunk/firstboot/src/Firstboot.ycp
trunk/firstboot/src/Makefile.am
trunk/firstboot/src/data/sysconfig.firstboot
trunk/firstboot/src/firstboot_write.ycp
trunk/firstboot/yast2-firstboot.spec.in
Modified: trunk/firstboot/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/VERSION?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/VERSION (original)
+++ trunk/firstboot/VERSION Tue Jul 22 13:13:05 2008
@@ -1 +1 @@
-2.17.0
+2.17.1
Modified: trunk/firstboot/doc/firstboot-section_mod.xml
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/doc/firstboot-section_mod.xml?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/doc/firstboot-section_mod.xml (original)
+++ trunk/firstboot/doc/firstboot-section_mod.xml Tue Jul 22 13:13:05 2008
@@ -2,8 +2,8 @@
<section>
<title>Firstboot Configuration</title>
<para>The YaST firstboot utility (YaST Initial System Configuration), which
- runs after the installation is completed, lets you configure the Novell
- Linux Desktop system before creation of the install image so that on the
+ runs after the installation is completed, lets you configure the
+ before creation of the install image so that on the
first boot after configuration, users are guided through a series of
steps that allow for easier configuration of their desktops. YaST
firstboot does not run by default and has to be configured to run by the
@@ -195,8 +195,12 @@
about the syntax of the control file, see the document titled
âProduct Installation Controlâ.
-->
-</para>
-
+ </para>
+ <para>Instead of modifying the default /etc/YaST2/firstboot.xml file,
+ it is possible to put the customized one to different location and
+ specify path to it by altering the value of FIRSTBOOT_CONTROL_FILE
+ variable in /etc/sysconfig/firstboot.
+ </para>
</section>
</section>
<section>
@@ -208,8 +212,45 @@
location that can be set using the
<filename>/etc/sysconfig/firstboot</filename> configuration
file.</para>
-
-
-
+ </section>
+ <section>
+ <title>Firstboot and AutoYaST</title>
+ <para>
+ It is possible to configure the firstboot process as a part of
+ autoinstallation, so the system can be installed with most of the
+ default values set via AutoYaST profile, leaving the rest to the end
+ user during the firstboot sequence.
+ </para>
+ <para>
+ As a part of autoinstallation configuration, you need to provide
+ all the changes mentioned above:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Customize <filename>/etc/sysconfig/firstboot</filename>:
+ it can be done e.g. via
+ Sysconfig Editor in System section of AutoYaST configuration module.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Provide customized firstboot.xml file and point to its
+ location in FIRSTBOOT_CONTROL_FILE value of
+ <filename>/etc/sysconfig/firstboot</filename>.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Enable Firstboot: do it via GUI in Misc/Firstboot section of
+ AutoYaST configuration module or manually by adding the section
+ <screen>
+ <![CDATA[
+<firstboot>
+ <firstboot_enabled config:type="boolean">true</firstboot_enabled>
+</firstboot>
+]]>
+ </screen>
+ to your AutoYaST profile.
+ </para>
+ </listitem>
+ </itemizedlist>
</section>
</section>
Modified: trunk/firstboot/package/yast2-firstboot.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/package/yast2-firstboot.changes?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/package/yast2-firstboot.changes (original)
+++ trunk/firstboot/package/yast2-firstboot.changes Tue Jul 22 13:13:05 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Tue Jul 22 11:28:57 CEST 2008 - jsuchome@suse.cz
+
+- addedd support fot autoyast (fate#301946):
+ client for firstboot enablement
+ configurable path to firstboot.xml
+ adapted documentation
+- 2.17.1
+
+-------------------------------------------------------------------
Tue Jul 15 10:17:32 CEST 2008 - jsuchome@suse.cz
- added default location of Novell license texts (fate#304865)
Modified: trunk/firstboot/src/Firstboot.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/Firstboot.ycp?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/src/Firstboot.ycp (original)
+++ trunk/firstboot/src/Firstboot.ycp Tue Jul 22 13:13:05 2008
@@ -19,8 +19,10 @@
import "Progress";
import "Internet";
import "Misc";
+import "Mode";
import "Directory";
import "ProductControl";
+import "Summary";
global boolean run_suseconfig = false;
@@ -33,16 +35,29 @@
global boolean language_changed = false;
-global string firstboot_control_file =
- "/etc/YaST2/firstboot.xml";
+// definition of firstboot sequence (and the default path)
+global string firstboot_control_file = "/etc/YaST2/firstboot.xml";
+
+// file triggering start of firstboot sequence
+global string reconfig_file = "/var/lib/YaST2/reconfig_system";
global string default_wm = "";
global list<string> installed_desktops = [];
+// for autoinstallation: should the firstboot be enbaled?
+global boolean firstboot_enabled = false;
+
+// if some settings were modified (currently for autoyast only)
+global boolean modified = false;
global void Firstboot()
{
+ if (Mode::config () || Mode::autoinst ())
+ {
+ y2milestone ("no firstboot initialization in mode %1", Mode::mode());
+ return;
+ }
show_y2cc_checkbox =
Misc::SysconfigRead(.sysconfig.firstboot.SHOW_Y2CC_CHECKBOX, "no") == "yes";
default_wm =
@@ -52,6 +67,11 @@
Progress::on();
Internet::do_you = true;
+ string control_file =
+ Misc::SysconfigRead (.sysconfig.firstboot.FIRSTBOOT_CONTROL_FILE, "");
+ if (control_file != "")
+ firstboot_control_file = control_file;
+
ProductControl::custom_control_file = firstboot_control_file;
if (!ProductControl::Init())
@@ -87,8 +107,57 @@
return true;
}
+/**
+ * Import firstboot settigs defined by autoyast
+ */
+global boolean Import (map settings) {
+
+ boolean ena = settings["firstboot_enabled"]:firstboot_enabled;
+ if (ena != firstboot_enabled)
+ {
+ firstboot_enabled = ena;
+ modified = true;
+ }
+ return modified;
+}
+
+/**
+ * Export firstboot settigs defined by autoyast
+ */
+global map Export () {
+ return $[
+ "firstboot_enabled" : firstboot_enabled
+ ];
+}
+/**
+ * Summary()
+ * returns html formated configuration summary
+ * @return summary
+ */
+global define string Summary () {
+ string summary =
+ // summary item
+ Summary::AddHeader ("", _("Firstboot configuration disabled"));
+ if (firstboot_enabled)
+ {
+ // summary item
+ summary = Summary::AddHeader ("", _("Firstboot configuration enabled"));
+ }
+ return summary;
+}
+/**
+ * Write firstboot settings
+ */
+global boolean Write () {
+ if (firstboot_enabled)
+ {
+ y2milestone ("enabling firstboot...");
+ SCR::Execute (.target.bash, "/bin/touch " + reconfig_file);
+ }
+}
+
/* EOF */
}
Modified: trunk/firstboot/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/Makefile.am?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/src/Makefile.am (original)
+++ trunk/firstboot/src/Makefile.am Tue Jul 22 13:13:05 2008
@@ -1,6 +1,7 @@
# Makefile.am for firstboot/src
yncludedir = @yncludedir@/firstboot
+
SUBDIRS = data control
client_DATA = \
@@ -15,7 +16,8 @@
firstboot.ycp \
firstboot_license_novell.ycp \
firstboot_network_write.ycp \
- firstboot_bootloader_reconfigure.ycp
+ firstboot_bootloader_reconfigure.ycp \
+ firstboot_auto.ycp
ynclude_DATA = \
routines.ycp
Modified: trunk/firstboot/src/data/sysconfig.firstboot
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/data/sysconfig.firstboot?rev=49321&r1=49320&r2=49321&view=diff
==============================================================================
--- trunk/firstboot/src/data/sysconfig.firstboot (original)
+++ trunk/firstboot/src/data/sysconfig.firstboot Tue Jul 22 13:13:05 2008
@@ -1,4 +1,4 @@
-## Path: System/Yast2
+## Path: System/Yast2/Firstboot
## Description: Firstboot Configuration
## Type: string
## Default: /usr/share/firstboot/scripts
@@ -7,6 +7,14 @@
#
SCRIPT_DIR="/usr/share/firstboot/scripts"
+## Type: string
+## Default: /etc/YaST2/firstboot.xml
+#
+# Path to firstboot workflow file. Change this to provide customized file
+# with a description of the workflow sequence.
+#
+FIRSTBOOT_CONTROL_FILE="/etc/YaST2/firstboot.xml"
+
## Type: string
## Default: ""
#
Added: trunk/firstboot/src/firstboot_auto.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/firstboot/src/firstboot_auto.ycp?rev=49321&view=auto
==============================================================================
--- trunk/firstboot/src/firstboot_auto.ycp (added)
+++ trunk/firstboot/src/firstboot_auto.ycp Tue Jul 22 13:13:05 2008
@@ -0,0 +1,92 @@
+/**
+ * Autoinstallation client for firstboot configuration
+ * Author : Jiri Suchomel
participants (1)
-
jsuchome@svn.opensuse.org