LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-06-2008, 05:39 PM   #1
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
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
 
Old 10-07-2008, 12:36 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
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.
 
Old 10-07-2008, 09:55 AM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979

Original Poster
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by born4linux View Post
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount: mount to NFS server '192.168.0.3' failed: System Error: Connection refused. fakie_flip Linux - Server 1 04-10-2008 12:28 AM
Slow or failed copy of large files to NFS david.skinner Linux - Networking 1 06-11-2006 05:22 AM
Cannot overwrite files on NFS mount? dirdej Linux - Networking 6 03-05-2006 06:46 AM
Cant copy files to a fat partition i mount as RW? FocusedWolf Linux - Hardware 6 03-18-2004 04:43 PM
How to copy files from A computer of NT System to The other one of Unix system? whepin Linux - Newbie 5 04-06-2003 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration