-add service node support for SLES11;\nservice.repolist is used to store the repos
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3101 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
78715fb930
commit
2237ec6a76
@ -161,7 +161,11 @@ unless ($onlyinitrd) {
|
||||
chomp;
|
||||
next if /^\s*#/;
|
||||
($repotype,$repourl,$repoalias) = split m/\|/;
|
||||
system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ sa -t $repotype $repourl $repoalias");
|
||||
if ($osver =~ /sles11/ && $osver_host == 11) {
|
||||
system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ ar $repourl $repoalias");
|
||||
}else {
|
||||
system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ sa -t $repotype $repourl $repoalias");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +174,7 @@ unless ($onlyinitrd) {
|
||||
#mkpath("$installroot/netboot/$osver/$arch/$profile/rootimg/var/lib/yum");
|
||||
my $yumcmd;
|
||||
if($osver =~ /sles11/ && $osver_host == 11) {
|
||||
$yumcmd = "YAST_IS_RUNNING=\"instsys\" zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ install -l "; #add -l for SLES11
|
||||
$yumcmd = "zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ install -l "; #add -l for SLES11
|
||||
}else {
|
||||
$yumcmd = "zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ install ";
|
||||
}
|
||||
|
14
xCAT-server/share/xcat/netboot/sles/service.repolist
Normal file
14
xCAT-server/share/xcat/netboot/sles/service.repolist
Normal file
@ -0,0 +1,14 @@
|
||||
#--
|
||||
#-- This file contains list of custom repositories (directory with rpms).
|
||||
#-- Repositories will be added to the image before package installation.
|
||||
#-- This makes possible to automatically install (by defining in {profile}.pkglist)
|
||||
#-- packages that are not contained in standard distribution repository
|
||||
#--
|
||||
#-- File format:
|
||||
#Type|URL|name
|
||||
#-- example:
|
||||
#Plaindir|file:/install/sles10sp2/x86_64/custom|custom
|
||||
|
||||
rpm-md|http://xcat.sourceforge.net/yum/xcat-dep/sles11/ppc64|xcat-dep
|
||||
rpm-md|http://xcat.sourceforge.net/yum/devel/core-snap|core-snap
|
||||
plaindir|file:///install/post/otherpkgs/sles11/ppc64|otherpkgs
|
@ -0,0 +1,41 @@
|
||||
aaa_base
|
||||
bash
|
||||
sysconfig
|
||||
syslog-ng
|
||||
klogd
|
||||
kernel-ppc64
|
||||
openssh
|
||||
vim
|
||||
rpm
|
||||
bind
|
||||
bind-utils
|
||||
atftp
|
||||
ksh
|
||||
nfs-utils
|
||||
dhcp
|
||||
dhcpcd
|
||||
dhcp-client
|
||||
dhcp-relay
|
||||
dhcp-server
|
||||
bzip2
|
||||
cron
|
||||
wget
|
||||
vsftpd
|
||||
util-linux
|
||||
module-init-tools
|
||||
mkinitrd
|
||||
apache2
|
||||
apache2-prefork
|
||||
psmisc
|
||||
dbus-1
|
||||
hal
|
||||
pam
|
||||
pam-modules
|
||||
timezone
|
||||
mysql-client
|
||||
perl-Expect
|
||||
stunnel
|
||||
xCATsn
|
||||
perl-DBD-mysql
|
||||
portmap
|
||||
zypper
|
72
xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.postinstall
Executable file
72
xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.postinstall
Executable file
@ -0,0 +1,72 @@
|
||||
#!/bin/sh
|
||||
#-- Do not remove following line if you want to make use of CVS version tracking
|
||||
#-- $Id: compute.postinstall,v 1.21 2008/09/04 12:05:45 sikorsky Exp $
|
||||
#-- jurij.sikorsky@t-systems.cz
|
||||
#--
|
||||
#-- this script is run after all packages from $profile.pkglist are installed
|
||||
#--
|
||||
#-- it gets these arguments:
|
||||
#--
|
||||
#-- $1 = install root (chroot directory for profile)
|
||||
#-- $2 = OS version
|
||||
#-- $3 = architecture
|
||||
#-- $4 = profile name
|
||||
#-- $5 = work dir (where genimage is located)
|
||||
#--
|
||||
#--
|
||||
installroot=$1
|
||||
osver=$2
|
||||
arch=$3
|
||||
profile=$4
|
||||
workdir=$5
|
||||
|
||||
#-- Example how /etc/fstab can be automatically generated during image generation:
|
||||
cp $installroot/etc/fstab $installroot/etc/fstab.prev
|
||||
cat <<END >$installroot/etc/fstab
|
||||
proc /proc proc rw 0 0
|
||||
sysfs /sys sysfs rw 0 0
|
||||
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
|
||||
${profile}_${arch} / tmpfs rw 0 1
|
||||
none /tmp tmpfs defaults,size=10m 0 2
|
||||
none /var/tmp tmpfs defaults,size=10m 0 2
|
||||
END
|
||||
|
||||
|
||||
cat <<END >>$installroot/etc/hosts
|
||||
9.114.47.247 xcat_n02
|
||||
9.114.47.248 xcat_n03
|
||||
END
|
||||
|
||||
|
||||
#Prevent DHCP from starting up until xcatd has had a chance to configure it:
|
||||
chroot $installroot chkconfig dhcpd off
|
||||
chroot $installroot chkconfig dhcrelay off
|
||||
|
||||
#turn on some services
|
||||
chroot $installroot chkconfig dbus on
|
||||
chroot $installroot chkconfig boot.localnet on
|
||||
chroot $installroot chkconfig haldaemon on
|
||||
chroot $installroot chkconfig network on
|
||||
chroot $installroot chkconfig syslog on
|
||||
chroot $installroot chkconfig apache2 on
|
||||
|
||||
#export /install as read-only
|
||||
mkdir -p /install
|
||||
echo '/install *(ro,no_root_squash,sync,fsid=13)' > $installroot/etc/exports
|
||||
|
||||
#uncomment out the cons line in etc/inittab
|
||||
#sed -i 's/^\#\(\s\)*cons/cons/' $installroot/etc/inittab
|
||||
|
||||
TMP_inittab=`sed 's/\(#\)\(cons:12345.*\)$/\2/' $installroot/etc/inittab`
|
||||
echo "$TMP_inittab" > $installroot/etc/inittab
|
||||
|
||||
|
||||
#copy /etc/xcat/cfgloc to rootimg
|
||||
cp /etc/xcat/cfgloc $installroot/etc/xcat
|
||||
#-- Example of booted image versioning
|
||||
#-- We want to know, with what configuration (version of the image) each node was booted.
|
||||
#-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run.
|
||||
#cat /dev/null > $installroot/etc/IMGVERSION
|
||||
#for ext in pkglist exlist postinstall repolist; do
|
||||
# [ -r $workdir/$profile.$ext ] && cat $workdir/$profile.$ext | grep -E '^[[:space:]]*#.*[[:space:]]\$Id' >> $installroot/etc/IMGVERSION
|
||||
#done
|
Loading…
x
Reference in New Issue
Block a user