LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2008, 02:00 AM   #1
qiuzhihong
LQ Newbie
 
Registered: Jul 2007
Posts: 7

Rep: Reputation: 0
Post script in kickstart


My post script in kickstart return errors. But the script can run well alone after installation.

Error messages:
http://linux.chinaunix.net/bbs/attac...LxsgpdiQDd.jpg

ks.cfg:

#platform=x86, AMD64, 或 Intel EM64T
# System authorization information
auth --useshadow --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Use text mode install
text
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang zh_CN
# Installation logging level
logging --level=info
# Use NFS installation media
nfs --server=192.168.187.140 --dir=/centos/
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
network --bootproto=dhcp --device=eth1 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw stugrid

# SELinux configuration
selinux --disabled
# System timezone
timezone Asia/Shanghai
# Install OS instead of upgrade
install
# X Window System configuration information

xconfig --defaultdesktop=GNOME --depth=32 --resolution=800x600 --startxonboot

%post --interp python --nochroot
#!/usr/bin/env python
#coding=utf-8
#Auto install Globus and software it dependent
#File:globusinstall.py

import os
from subprocess import *

call(['/usr/bin/yum', '-y', 'install', 'perl-XML-Parser'])

#The three packages: apache-ant-1.7.0-bin.tar.gz、jdk-6u2-linux-i586-rpm.bin、
#gt4.0.5-all-source-installer.tar.gz are put on /root/

call(['/bin/mount', '192.168.187.140:/grid', '/mnt'])
call(['/bin/cp', '/mnt/jdk-6u2-linux-i586-rpm.bin', '/root/jdk-6u2-linux-i586-rpm.bin'])
call(['/bin/cp', '/mnt/apache-ant-1.7.0-bin.tar.gz', '/root/apache-ant-1.7.0-bin.tar.gz'])
call(['/bin/cp', '/mnt/gt4.0.5-all-source-installer.tar.gz', '/root/gt4.0.5-all-source-installer.tar.gz'])


#install jdk
os.chdir('/root')
call(['/bin/chmod', '+x', 'jdk-6u2-linux-i586-rpm.bin'])
call(['/bin/cp', 'jdk-6u2-linux-i586-rpm.bin', '/usr/local'])

os.chdir('/usr/local')
logFile = file("./install.log", "w")
subProc = Popen(["./jdk-6u2-linux-i586-rpm.bin"], stdin = PIPE, stdout = logFile)
subProc.communicate("y")


%packages
@server-cfg
@base-x
@legacy-software-development
@gnome-desktop
@base
@x-software-development
@network-server
@kde-software-development
@development-libs
@java
@web-server
@mysql
@admin-tools
@gnome-software-development
@development-tools
@kde-desktop
@legacy-software-support
@sql-server
@java-development
@emacs
@graphical-internet
@graphics
@text-internet
@system-tools
@ftp-server
@smb-server
@editors
@ruby
@engineering-and-scientific
@dns-server

Last edited by qiuzhihong; 04-19-2008 at 02:02 AM.
 
Old 04-19-2008, 03:52 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You need to chroot into the new install to correctly run the script, right now you are running it within the install environment
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kickstart post-installation abhi2778 Linux - Software 8 07-10-2012 09:30 AM
Kickstart %post ftp problem tuesday Linux - General 6 04-01-2008 01:04 AM
running %post script for Mailserver through kickstart abhi2778 Fedora 0 09-06-2006 03:12 AM
rh9 kickstart post install help stockcowboy Linux - Newbie 1 12-05-2003 11:45 AM
Kickstart Post-install tasks TheRealDeal Linux - General 0 09-03-2003 01:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 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