Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > bb2b3181a15385f4d6701135404d7ec7 > files > 35

drakx-autoinstall-doc-10.0.3-6mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
	<TITLE>Auto Install for Mandrakelinux</TITLE>
	<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.0  (Linux)">
	<META NAME="AUTHOR" CONTENT="David Eastcott">
	<META NAME="CREATED" CONTENT="20040221;10385500">
	<META NAME="CHANGEDBY" CONTENT="David Eastcott">
	<META NAME="CHANGED" CONTENT="20040502;8530300">
	<META NAME="CLASSIFICATION" CONTENT="DrakX Auto Install Reference">
	<META NAME="KEYWORDS" CONTENT="DrakX Autoinstall">
	<STYLE>
	<!--
		@page { size: 8.5in 11in; margin: 1in }
		P { margin-left: 0.5in; margin-bottom: 0.08in; page-break-before: auto }
		P.western { font-size: 10pt; font-weight: medium }
		P.text-body-indent-western { margin-left: 0.2in; font-size: 10pt; font-weight: medium }
		P.text-body-indent-cjk { margin-left: 0.2in }
		P.text-body-indent-ctl { margin-left: 0.2in }
		H1 { margin-bottom: 0.08in; page-break-before: always }
		H1.western { font-family: "Times" }
		H1.cjk { font-family: "Mincho"; font-size: 16pt }
		H1.ctl { font-family: "Lucidasans"; font-size: 16pt }
		H2 { margin-bottom: 0.08in; page-break-before: auto }
		H2.western { font-family: "Times"; font-style: normal }
		H2.cjk { font-family: "Mincho"; font-size: 14pt; font-style: italic }
		H2.ctl { font-size: 14pt; font-style: italic }
		H3 { margin-bottom: 0.08in; page-break-before: auto }
		H3.western { font-family: "Times" }
		H3.cjk { font-family: "Mincho" }
		H4 { margin-left: 0.5in; margin-bottom: 0.08in; page-break-before: auto }
		H4.western { font-family: "Times"; font-style: normal }
		H4.cjk { font-family: "Mincho"; font-size: 11pt; font-style: italic }
		H4.ctl { font-size: 11pt; font-style: italic }
		TD P { margin-left: 0.5in; margin-bottom: 0.08in; page-break-before: auto }
		TD P.western { font-size: 10pt; font-weight: medium }
		TH P { margin-left: 0.5in; margin-bottom: 0.08in; page-break-before: auto }
		TH P.western { font-size: 10pt; font-style: italic }
		TH P.cjk { font-style: italic }
		TH P.ctl { font-style: italic }
		P.headings-special-western { margin-top: 0.3in; margin-bottom: 0.1in; font-size: 10pt; font-weight: bold; page-break-after: avoid }
		P.headings-special-cjk { margin-top: 0.3in; margin-bottom: 0.1in; page-break-after: avoid }
		P.headings-special-ctl { margin-top: 0.3in; margin-bottom: 0.1in; page-break-after: avoid }
		P.closecode-western { margin-left: 1in; margin-bottom: 0in; font-family: "Courier", monospace; font-size: 9pt; font-weight: medium }
		P.closecode-cjk { margin-left: 1in; margin-bottom: 0in }
		P.closecode-ctl { margin-left: 1in; margin-bottom: 0in }
		P.coderef-western { margin-left: 1in; margin-bottom: 0.08in; font-family: "Courier", monospace; font-size: 10pt; font-weight: medium }
		P.coderef-cjk { margin-left: 1in; margin-bottom: 0.08in }
		P.coderef-ctl { margin-left: 1in; margin-bottom: 0.08in }
	-->
	</STYLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF">
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TH COLSPAN="3" ALIGN="CENTER">
Auto Install for Mandrakelinux</TH></TR><TR>
<TD WIDTH="10%" ALIGN="LEFT" VALIGN="BOTTOM">
<A HREF="section4-24.html">Prev</A></TD><TD WIDTH="80%" ALIGN="CENTER" VALIGN="BOTTOM"></TD>
<TD WIDTH="10%" ALIGN="RIGHT" VALIGN="BOTTOM">
<A HREF="section4-26.html">Next</A></TD></TR></TABLE><HR ALIGN="LEFT" WIDTH="100%">
<H2 CLASS="western" STYLE="page-break-before: always"><A NAME="postInstall_and_postInstallNonRooted"></A>
postInstall and postInstallNonRooted 
</H2>
<P CLASS="western">This option provides the installer two simple
methods for performing post installation activities on the installed
system.  You can use one or the other or both methods.  If you want
to use both, then the installer will execute the
<FONT FACE="Courier, monospace">'postInstallNonRooted'</FONT><FONT FACE="Times, serif">
first</FONT>, then the <FONT FACE="Courier, monospace">'postInstall'</FONT>
last.</P>
<P CLASS="headings-special-western">postInstall:</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western" STYLE="margin-left: 1.2in">'postInstall'
			=&gt; &quot;</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western">echo \&quot;This is a test string\&quot;
			&gt; /root/test.log</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western">&quot;</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" STYLE="margin-top: 0.15in; margin-bottom: 0.08in">For
this option, the install script is executed as root on the target
computer with the environment set to that of the target computer.  In
other words, any references to the file system are relative to the
target computers <FONT FACE="Courier, monospace">/</FONT> (root).  In
addition, DrakX executes the script that you define using the form: 
<FONT FACE="Courier, monospace">chroot /mnt bash -c &lt;yourscript
here&gt;</FONT> (<FONT FACE="Courier, monospace">/mnt</FONT> is the
directory, in the DrakX environment, under which the entire file
system for the target computer is located).</P>
<P CLASS="headings-special-western">postInstallNonRooted:</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western" STYLE="margin-left: 1.2in">'postInstallNonRooted'
			=&gt; '</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western">echo &quot;This is a test string&quot;
			&gt; /mnt/root/test.log</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6ff">
			<P CLASS="coderef-western">'</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" STYLE="margin-top: 0.15in; margin-bottom: 0.08in">For
this option, the install script is executed within the current
environment of the DrakX install program.  In other words, any
references to the file system are relative to DrakX's <FONT FACE="Courier, monospace">/</FONT>
(root).  In addition, DrakX executes the script that you define using
the form: <FONT FACE="Courier, monospace">bash -c &lt;yourscript
here&gt;</FONT>. 
</P>
<P CLASS="western">The above two examples produce the exact same
result; the string, This is a test string  is placed in a file called
<FONT FACE="Courier, monospace">test.log</FONT> located in the <FONT FACE="Courier, monospace">/root</FONT>
directory on the target computer.  For the observant, there are a
some other subtle differences.  The use of a perl single-quote string
literal (which allows only the <FONT FACE="Courier, monospace">\'</FONT>
and <FONT FACE="Courier, monospace">\\</FONT> escape-sequences) and
the perl double-quote string literal (which allows backslash and
variable interpolation).  Either form can be used with either option,
although the single-quote form is the easiest to follow and likely
the most often used.  In the double-quote form, the double-quote (<FONT FACE="Courier, monospace">&quot;</FONT>)
before and after the string <FONT FACE="Courier, monospace">This is a
test string</FONT> had to be 'escaped', otherwise the script would
have terminated prematurely and as a consequence not be executed.</P>
<P CLASS="headings-special-western">Examples:</P>
<P CLASS="western">The following are a simple set of examples which
demonstrate the use of these options.</P>
<P CLASS="western">Change the default auto install run level from 5
to 3 (uses &quot;&quot; so that the sed parameter does not have to be
'escaped'):</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western" STYLE="margin-left: 1.2in">'postInstall'
			=&gt; &quot;</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># change run level from 5 to 3</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">cat /etc/inittab | sed
			's/^id:5:init/id:3:init/' &gt; /etc/inittab1</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">mv -f /etc/inittab1 /etc/inittab</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">&quot;</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" STYLE="margin-top: 0.15in; margin-bottom: 0.15in">Or
using a simple perl one-liner:</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western" STYLE="margin-left: 1.2in">'postInstall'
			=&gt; '</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># change run level from 5 to 3</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">perl -p -i -e
			&quot;s/^id:5:init/id:3:init/&quot; /etc/inittab</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">'</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" STYLE="margin-bottom: 0.15in">Copy the auto
install configuration file defined with the <FONT FACE="Courier, monospace">syslinux.cfg</FONT>
append parameter <FONT FACE="Courier, monospace">auto_install=</FONT>
to the target computers <FONT FACE="Courier, monospace">/root/drakx</FONT>
directory (this only works for NFS and CD-ROM source medias):</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western" STYLE="margin-left: 1.2in">'postInstallNonRooted'
			=&gt; &quot;</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># copy the file from the source media</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">cp /tmp/image/$::auto_install
			/mnt/root/drakx/</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">&quot;</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western" STYLE="margin-top: 0.15in; margin-bottom: 0.15in">A
little more complicated variation:</P>
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=256*>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western" STYLE="margin-left: 1.2in">'postInstall'
			=&gt; '</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># only if the NTP package is
			installed</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">if [ -f /etc/ntp.conf ]; then</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western" STYLE="margin-left: 1.2in">cat &lt;&lt;EOF1
			&gt; /etc/ntp/step-tickers</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">time-server.eastcott.net</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">EOF1</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">fi</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># clean up bug for Netscape</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">cat &lt;&lt;EOF2 &gt;&gt;
			/etc/skel/.bash_profile</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"># clean up old cache files, since
			Netscape doesn't</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">[ -d ~/.netscape ] &amp;&amp; rm -rf
			~/.netscape/cache/*</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western"><BR>
			</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">EOF2</P>
		</TD>
	</TR>
	<TR>
		<TD WIDTH=100% VALIGN=TOP BGCOLOR="#e6e6e6">
			<P CLASS="closecode-western">'</P>
		</TD>
	</TR>
</TABLE>
<TABLE WIDTH=847 BORDER=0 CELLPADDING=0 CELLSPACING=0>
	<COL WIDTH=60>
	<COL WIDTH=788>
	<TR VALIGN=TOP>
		<TD WIDTH=60>
			<P CLASS="western" STYLE="margin-left: 0in"><IMG SRC="AutoInstall-10.0.3_html_1412bb95.png" NAME="Graphic34" ALIGN=LEFT WIDTH=30 HEIGHT=30 BORDER=0><BR CLEAR=LEFT><BR>
			</P>
		</TD>
		<TD WIDTH=788>
			<P CLASS="western">The <FONT FACE="Courier, monospace">EOF</FONT>
			(or what you used for <FONT FACE="Courier, monospace">&lt;&lt;EOF</FONT>)
			MUST begin in column 1 and be on a line by itself.</P>
		</TD>
	</TR>
</TABLE>
<P CLASS="western">One final note, if you selected <FONT FACE="Courier, monospace">'autoExitInstall'
=&gt; 0,</FONT> then these two options do <B>NOT</B> get executed
until AFTER you press the ENTER key at the end of the installation
process.</P>
<P CLASS="headings-special-western">Related Option Entries:</P>
<P CLASS="western">Depends on what all you installed.</P>
<P CLASS="western"><BR><BR>
</P>
<HR ALIGN="LEFT" WIDTH="100%">
<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<TR><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP"><A HREF="section4-24.html">Prev</A></TD><TD WIDTH="34%" ALIGN="CENTER" VALIGN="TOP"><A HREF="index.html">Home</A></TD>
<TD WIDTH="33%" ALIGN="RIGHT" VALIGN="TOP"><A HREF="section4-26.html">Next</A></TD></TR>
<TR><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP">partitions</TD>
<TD WIDTH="34%" ALIGN="CENTER" VALIGN="TOP">&nbsp;</TD>
<TD WIDTH="33%" ALIGN="RIGHT" VALIGN="TOP">printer</TD></TR></TABLE>
</BODY>
</HTML>