LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Copy files from kickstart nfs mount to new system... (https://www.linuxquestions.org/questions/linux-general-1/copy-files-from-kickstart-nfs-mount-to-new-system-674673/)

custangro 10-06-2008 05:39 PM

Copy files from kickstart nfs mount to new system...
 
Hello,

I have a "kickstart" server that has the ks.cfg file and the installation rpms so that I can have an "unattended" install.

Everything works like it should...but I still have to do some post installation tasks.

Is there a way to copy something from the nfs kickstart share to the "newly installed system" under the "%post" part of the ks.cfg file?

Thanks,

-C

born4linux 10-07-2008 12:36 AM

you can create a custom script and have do the post-install tasks
after you have rebooted the machine.
something like:

%post
/usr/bin/wget http://YOUR_KS_SERVER/ks/${HOST_NAME}_post_install.sh
/bin/mv ${HOST_NAME}_post_install.sh /etc/rc.d/init.d/${HOST_NAME}_post_install.sh
chmod +x /etc/rc.d/init.d/${HOST_NAME}_post_install.sh
ln -s /etc/rc.d/init.d/${HOST_NAME}_post_install.sh /etc/rc.d/rc3.d/S86${HOST_NAME}_post_install

the script will run during startup.
make sure you disable or delete the script once it has done its job.

custangro 10-07-2008 09:55 AM

Quote:

Originally Posted by born4linux (Post 3302576)
you can create a custom script and have do the post-install tasks
after you have rebooted the machine.
something like:

%post
/usr/bin/wget http://YOUR_KS_SERVER/ks/${HOST_NAME}_post_install.sh
/bin/mv ${HOST_NAME}_post_install.sh /etc/rc.d/init.d/${HOST_NAME}_post_install.sh
chmod +x /etc/rc.d/init.d/${HOST_NAME}_post_install.sh
ln -s /etc/rc.d/init.d/${HOST_NAME}_post_install.sh /etc/rc.d/rc3.d/S86${HOST_NAME}_post_install

the script will run during startup.
make sure you disable or delete the script once it has done its job.

Thanks.

I was actually thinking more on the lines of...

Code:

%post
groupadd mygroup
useradd -c "My Name" -g mygroup myname
echo "password" | passwd --stdin
mkdir -p ~myname/bin
chown myname:mygroup ~myname/bin
mv nfssrv:/kickstart/stuff/.bashrc ~myname/
mv nfsrv:/kickstart/stuff/myscripts.tar ~myname/bin/

The stuff in bold is what I'm not sure how to do...

-C


All times are GMT -5. The time now is 11:15 PM.