Everyone, The mount command is still complaining. Here's the extended relevant section of my XML file (including the additions and a slightly changed server share): --------------- <post-scripts config:type="list"> <script> <filename>start-generic</filename> <interpreter>shell</interpreter> <source> <![CDATA[#!/bin/sh /bin/mkdir -p /usr/local/mnt/resources /usr/bin/id /bin/mount -t nfs 1.2.3.4:/export/install/SuSE9.0 /usr/local/mnt/resources for MYSCRIPT in /usr/local/mnt/resources/scripts/generic/A*; do $MYSCRIPT done > /var/adm/autoinstall/logs/generic.log 2>&1 /bin/umount /usr/local/mnt/resources]]> </source> </script> </post-scripts> --------------- and here's the ouput from /var/adm/autoinstall/logs/start-generic.log: --------------- + /bin/mkdir -p /usr/local/mnt/resources + /usr/bin/id uid=0(root) gid=0(root) + /bin/mount -t nfs 1.2.3.4:/export/install/SuSE9.0 /usr/local/mnt/resources mount: only root can do that + /bin/umount /usr/local/mnt/resources umount: /usr/local/mnt/resources is not mounted (according to mtab) --------------- and /var/adm/autoinstall/logs/generic.log: --------------- + '/usr/local/mnt/resources/scripts/generic/A*' /var/adm/autoinstall/scripts/start-generic: line 10: /usr/local/mnt/resources/scripts/generic/A*: No such file or directory --------------- I know how to do this in rc scripts and I'm not a purist, so I'm moving on (to an rc script). :) Maybe I failed to notice something in the docs or I've missed the same typo 10 times in a row, but this script works fine run manually post-install so there may be more to it... Thanks everyone for your ideas! Roy Roy Butler wrote:
Andreas,
The mkdir doesn't complain and /mnt/resources exists later, but I'll give it a shot under a non-/mnt directory (along with "-t nfs").
I'm thinking it has something strange to do with autoinstall's environment or the security mechanism's possibly changing underneath itself during the run of YaST2.firstboot...
Thanks, Roy
Andreas Vetter wrote:
Hi!
What I do is:
<![CDATA[#!/bin/sh mount 1.2.3.4:/local_x86 /usr/local rpm -iv /usr/local/SOFTWARE/suse90/*.rpm umount 1.2.3.4:/local_x86 ]]>
And it works. Does your mkdir really work? Perhaps /mnt is already mounted by autoyast at that time. Have you tried mounting to another directory?
Regards, Andreas
On Wed, 2 Jun 2004, Roy Butler wrote:
Autoinstall gurus,
I'm trying to mount an NFS share from a post-install script and it's failing with the error "mount: only root can do that". I threw a call to id in the script and it reports "uid=0(root) gid=0(root)", so I'm a little baffled. The mount can be performed manually during the install or after completion with no problem. Here's the relevant part of my XML configuration file (server IP faked):
--------------------
<![CDATA[#!/bin/sh
mkdir /mnt/resources
id
mount 1.2.3.4:/autoinst/SuSE9.0 /mnt/resources
for MYSCRIPT in /mnt/resources/scripts/generic/A*; do $MYSCRIPT done > /var/adm/autoinstall/logs/generic.log 2>&1
umount /mnt/resources]]>
--------------------
Does anybody have an idea what the issue could be? I need it to happen after the RPM installs. I suppose I could throw this in a one-time rc script, but I'd like to understand the underlying issue...
Thanks, Roy