[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-autoinstall
Subject:    [suse-autoinstall] Workaround for the <location>nfs://  bug
From:       Frank Steiner <fsteiner-mail () bio ! ifi ! lmu ! de>
Date:       2004-07-16 20:06:09
Message-ID: 40F83531.3040803 () bio ! ifi ! lmu ! de
[Download RAW message or body]

Hi,

as I posted earlier, <location>nfs:// </location> does not
work for chroot scripts, since autoyast mounts the directory
specified in <location> at /mnt, where the installed system
was already mounted. Thus, autoyast cannot copy the chroot
scripts into the installed system...

Here's a workaround:

- assume we have the scripts in /rpm/autoyast/9.1/scripts/
   where /rpm/autoyast/9.1/ is our autoyast directory with
   rules/ subdir etc.

- you should have "autoyast=nfs://192.168.0.1/rpm/autoyast/9.1"
   defined, e.g. in the info file on on the append line in
   pxelinux.cfg. If you don't install over nfs and don't have
   such a line, it doesn't make sense to get the chroot scripts
   via nfs...

- the autoyast line will cause the variable "$autoyast" to be
   defined with the value defined above in the environment where
   the chroot scripts run. Thus, we just write a little chroot
   script which mounts the scripts dir to some different
   directory:

     <scripts>
       <chroot-scripts config:type="list" >
         <script>
           <!--
           <interpreter>shell</interpreter>
           <location>nfs://141.84.1.131/rpm-export/autoyast/9.1/scripts/prepare_pos
t.script</location>
           -->
           <filename>prepare-post.sh</filename>
           <source><![CDATA[
#!/bin/bash
mkdir /mnttmp || exit 1
# mount the autoyast dir from the server. we just splitt the
# value "autoyast=nfs://..." along the / characters
mount `echo $autoyast| cut -d/ -f 3-3`:/`echo $autoyast| cut -d/ -f 4-` /mnttmp ||
  exit 1

# now you can access all of your scripts in /mnttmp. E.g.m copy
# them to /mnt/var/adm/autoinstall/scripts like AY would do it,
# or execute them directly from the /mnttmp dir.

umount /mnttmp
]]>
         </source>
         </script>
       </chroot-scripts>
     </scripts>


Thus, you can keep all of your chroot scripts in normal files
(which makes it easier to debug) and still get them via nfs,
until the bug in autoyast is fixed. You can also work with
some other variables like the "install" variable or "Server"
etc.

Have fun :-)

cu,
Frank


-- 
Dipl.-Inform. Frank Steiner   Web:  http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik    Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr 17            Phone: +49 89 2180-4049
80333 Muenchen, Germany       Fax:              -4054
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *

-- 
To unsubscribe, e-mail: suse-autoinstall-unsubscribe@suse.com
For additional commands, e-mail: suse-autoinstall-help@suse.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic