Commit 03529570 by sungmin

* updated config file for uxenos install

 - modified fai config file
 - added uxenos local package deb file
parent 6d752ad0
...@@ -4,13 +4,13 @@ export const REFRESH_INTERVAL = 25 * 60 * 1000 ...@@ -4,13 +4,13 @@ export const REFRESH_INTERVAL = 25 * 60 * 1000
/* /*
export const selectOS = [ export const selectOS = [
{label: 'CENTOS7', value: 'CENTOS7'}, {label: 'CENTOS7', value: 'CENTOS7'},
{label: 'UXENOS', value: 'UXENOS'},
{label: 'JESSIE', value: 'JESSIE'} {label: 'JESSIE', value: 'JESSIE'}
] ]
*/ */
export const selectOS = [ export const selectOS = [
{label: 'CENTOS7', value: 'CENTOS7'}, {label: 'CENTOS7', value: 'CENTOS7'},
{label: 'JESSIE', value: 'JESSIE'} {label: 'JESSIE', value: 'JESSIE'},
{label: 'UXENOS', value: 'UXENOS'}
] ]
export function checkStrength (pw) { export function checkStrength (pw) {
// initialize // initialize
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
# Define your local mirros here # Define your local mirros here
# For the first stage, set the CentOS/SLC mirror in /etc/rinse/rinse.conf # For the first stage, set the CentOS/SLC mirror in /etc/rinse/rinse.conf
MIRROR_UXENOS=http://snapshot.debian.org/archive/debian/20151104T034200Z/
MIRROR_DEBIAN=http://ftp.daum.net/debian/ MIRROR_DEBIAN=http://ftp.daum.net/debian/
MIRROR_UBUNTU=http://ftp.daum.net/ubuntu/ MIRROR_UBUNTU=http://ftp.daum.net/ubuntu/
MIRROR_CENTOS=http://ftp.daum.net/ MIRROR_CENTOS=http://ftp.daum.net/
...@@ -177,6 +178,16 @@ wheezy() { ...@@ -177,6 +178,16 @@ wheezy() {
tarit tarit
} }
uxenos() {
local arch=$1
check
debootstrap --arch $arch --exclude=${EXCLUDE_JESSIE} --include=${INCLUDE_DEBIAN} jessie $xtmp ${MIRROR_UXENOS}
cleanup-deb
tarit
}
jessie() { jessie() {
local arch=$1 local arch=$1
...@@ -224,6 +235,7 @@ unknown() { ...@@ -224,6 +235,7 @@ unknown() {
SQUEEZE32 SQUEEZE64 SQUEEZE32 SQUEEZE64
WHEEZY32 WHEEZY64 WHEEZY32 WHEEZY64
JESSIE32 JESSIE64 JESSIE32 JESSIE64
UXENOS
" "
exit 99 exit 99
} }
...@@ -274,6 +286,7 @@ case "$target" in ...@@ -274,6 +286,7 @@ case "$target" in
WHEEZY64) wheezy amd64 ;; WHEEZY64) wheezy amd64 ;;
JESSIE32) jessie i386 ;; JESSIE32) jessie i386 ;;
JESSIE64) jessie amd64 ;; JESSIE64) jessie amd64 ;;
UXENOS) uxenos amd64 ;;
*) unknown ;; *) unknown ;;
esac esac
......
...@@ -32,9 +32,8 @@ case $OS in ...@@ -32,9 +32,8 @@ case $OS in
echo PORCH echo PORCH
exit 0 ;; exit 0 ;;
UXENOS) UXENOS)
echo "FAIBASE DEBIAN" echo "FAIBASE UXENOS"
ifclass AMD64 && echo JESSIE64 ifclass AMD64 && echo JESSIE64
echo UXENOS
echo PORCH echo PORCH
exit 0 ;; exit 0 ;;
TRUSTY) TRUSTY)
......
...@@ -3,5 +3,7 @@ tar cvf fai-CENTOS7-config.tar class debconf disk_config files hooks \ ...@@ -3,5 +3,7 @@ tar cvf fai-CENTOS7-config.tar class debconf disk_config files hooks \
package_config scripts pubkeys saltkey basefiles/CENTOS7_64.tar.xz package_config scripts pubkeys saltkey basefiles/CENTOS7_64.tar.xz
tar cvf fai-JESSIE-config.tar class debconf disk_config files hooks \ tar cvf fai-JESSIE-config.tar class debconf disk_config files hooks \
package_config scripts pubkeys saltkey basefiles/JESSIE64.tar.xz package_config scripts pubkeys saltkey basefiles/JESSIE64.tar.xz
tar cvf fai-XENIAL-config.tar class debconf disk_config files hooks \ tar cvf fai-UXENOS-config.tar class debconf debs disk_config files hooks \
package_config scripts pubkeys saltkey basefiles/XENIAL64.tar.xz package_config scripts pubkeys saltkey basefiles/UXENOS.tar.xz
#tar cvf fai-XENIAL-config.tar class debconf disk_config files hooks \
# package_config scripts pubkeys saltkey basefiles/XENIAL64.tar.xz
The file could not be displayed because it is too large.
#! /bin/bash
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
# set root password
$ROOTCMD usermod -p $ROOTPW root
exit $error
#!/bin/bash
#
# Capabilities get lost when creating the fai base.tar.xz image.
# Restore them here.
#
set -e
if [ ! -x $target/sbin/setcap ] ; then
exit 0
fi
for FILE in /bin/ping /bin/ping6 /usr/bin/fping /usr/bin/fping6; do
if [ -x $target/$FILE ] ; then
if $ROOTCMD /sbin/setcap cap_net_raw+ep $FILE; then
echo "Setcap worked! $FILE is not suid!"
fi
fi
done
if [ -x $target/usr/bin/systemd-detect-virt ] ; then
$ROOTCMD /sbin/setcap cap_dac_override,cap_sys_ptrace+ep /usr/bin/systemd-detect-virt
fi
#! /bin/bash
# Install custom deb files using dpkg.
#
# Heechul Kim, jijisa@iorchard.net
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
# create directory for deb files.
mkdir -p $target/debs
# copy uxen_deb.tar to $target/debs
tar -C $target/debs -xvf /var/lib/fai/config/debs/pengx_deb.tar
# copy kdump-config
cp $target/debs/kdump-config $target/usr/sbin/
# copy pengxai.deb
cp $target/debs/pengxapi.deb $target/opt
# install deb files.
#$ROOTCMD DEBIAN_FRONTEND=noninteractive dpkg -i /debs/*
#$ROOTCMD dpkg -i /debs/*
$ROOTCMD dpkg -i /debs/pengxconf.deb
$ROOTCMD dpkg -i /debs/kexec-tools_2.0.7-5_amd64.deb
$ROOTCMD dpkg -i /debs/libcacard0_1%3a2.5.0-2~bpo8+1_amd64.deb
$ROOTCMD dpkg -i /debs/qemu-utils_2.5+dfsg-4~bpo8+1_amd64.deb
$ROOTCMD dpkg -i /debs/qemu-system-common_2.5+dfsg-4~bpo8+1_amd64.deb
$ROOTCMD dpkg -i /debs/qemu-system-x86_2.5+dfsg-4~bpo8+1_amd64.deb
#! /bin/bash
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
#if ifclass DHCPC && [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]
#then
# cat > $target/etc/network/interfaces <<-EOF
# # generated by FAI
# auto lo $NIC1
# iface lo inet loopback
# iface $NIC1 inet dhcp
#EOF
#elif [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ]
#then
# PXE network config.
[ -n "$IPADDR" ] && cat > $target/etc/network/interfaces <<-EOF
# generated by FAI
#auto $NIC1
#iface $NIC1 inet static
# address $IPADDR
# netmask $NETMASK
auto eth0
iface eth0 inet static
address $IPADDR
netmask $NETMASK
gateway $GATEWAY
EOF
[ -n "$NETWORK" ] && echo "localnet $NETWORK" > $target/etc/networks
if [ ! -L $target/etc/resolv.conf -a -e /etc/resolv.conf ]; then
cp -p /etc/resolv.conf $target/etc
fi
#fi
# Add service network interface (fixed to 'eth1' for now)
#if [ -f $FAI/svc-interface ]
#then
# echo "Add service interface"
# cat $FAI/svc-interface >> $target/etc/network/interfaces
#else
# echo "No svc-interface. So set gateway on NIC1."
# echo " gateway $GATEWAY" >> $target/etc/network/interfaces
#fi
# here fcopy is mostly used, when installing a client for running in a
# different subnet than during the installation
fcopy -iM /etc/resolv.conf
fcopy -iM /etc/network/interfaces /etc/networks
exit $error
#!/bin/bash
# Log
LOGFILE="$target/var/log/simple-cdd-postinst.log"
echo "pengx3.postinst begin" >> $LOGFILE
# install blktap-utils
$ROOTCMD apt-get -qq update
$ROOTCMD apt-get install -y blktap-utils
echo "Finish to install blktap-utils." >> $LOGFILE
# remove nano
$ROOTCMD apt-get remove -y nano
# xen bridge setting on /etc/network/interfaces
INTERFACES="$target/etc/network/interfaces"
if [ -f $INTERFACES ]
then
ETH_NO=`grep '^iface.*eth' $INTERFACES|awk '{print $2}'|tr -d '\n'|tail -c 1`
perl -pi.bak -e "s/static/manual\\nauto xenbr$ETH_NO\\niface xenbr$ETH_NO inet static\\n \tbridge_ports eth$ETH_NO\\n \tbridge_maxwait 5/g" $INTERFACES
echo "Finish to set up xen bridge in $INTERFACES." >> $LOGFILE
else
echo "interfaces file is not found($INTERFACES)." >> $LOGFILE
fi
# xen toolstack setting
TOOLSTACK="$target/etc/default/xen"
if [ -f $TOOLSTACK ]
then
echo "TOOLSTACK=xl" > $TOOLSTACK
echo "Finish to set up xen toolstack in $TOOLSTACK." >> $LOGFILE
else
echo "toolstack file is not found($TOOLSTACK)." >> $LOGFILE
fi
# xendomains setting
XENDOMAINS="$target/etc/default/xendomains"
if [ -f $XENDOMAINS ]
then
perl -pi.bak -e "s/XENDOMAINS_SAVE.*\n/XENDOMAINS_SAVE=\n/g; s/XENDOMAINS_RESTORE.*\n/XENDOMAINS_RESTORE=false\n/g" $XENDOMAINS
echo "Finish to set up xendomains in $XENDOMAINS." >> $LOGFILE
else
echo "xendomains file is not found($XENDOMAINS)." >> $LOGFILE
fi
# modules setting
if [ -f $target/etc/modules ]
then
echo "blktap" >> $target/etc/modules
echo "Finish to add blktap module in /etc/modules." >> $LOGFILE
else
echo "/etc/modules file is not found." >> $LOGFILE
fi
# change boot order
if [ -f $target/etc/grub.d/20_linux_xen ]
then
dpkg-divert --divert $target/etc/grub.d/08_linux_xen --rename $target/etc/grub.d/20_linux_xen
$ROOTCMD update-grub
echo "Finish to change boot order for xen." >> $LOGFILE
else
echo "/etc/grub.d/20_linux_xen file is not found." >> $LOGFILE
fi
# update /etc/apt/sources.list
cat <<EOF > $target/etc/apt/sources.list
deb http://ftp.daumkakao.com/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://ftp.daumkakao.com/debian/ jessie main contrib non-free
EOF
echo "Finish to update /etc/apt/sources.list." >> $LOGFILE
# enable ssh root login
sed -i 's/PermitRootLogin.*/PermitRootLogin yes/g' $target/etc/ssh/sshd_config
# Add orchard into sudoers
cat <<EOF >> $target/etc/sudoers
orchard ALL=(ALL:ALL) NOPASSWD:ALL
EOF
echo "Finish to add orchard user into /etc/sudoers." >> $LOGFILE
# sysctl.conf parameters
echo "vm.vfs_cache_pressure = 500" >> $target/etc/sysctl.conf
echo "Finish to set sysctl.conf." >> $LOGFILE
# drop_caches
$ROOTCMD echo "0 * * * * sync && echo 1 > /proc/sys/vm/drop_caches" | crontab -
# drop_caches (disable log)
sed -i '/exit/d' $target/etc/rc.local
echo "echo 4 > /proc/sys/vm/drop_caches" >> $target/etc/rc.local
echo "exit 0" >> $target/etc/rc.local
# enable kdump
sed -i -e "s/USE_KDUMP=0/USE_KDUMP=1/g" $target/etc/default/kdump-tools
# script end
echo "pengx3.postinst end" >> $LOGFILE
#! /bin/bash
# (c) Thomas Lange, 2001-2015, lange@debian.org
# (c) Michael Goetze, 2010-2011, mgoetze@mgoetze.net
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
# a list of modules which are loaded at boot time
for module in $MODULESLIST; do
ainsl -a /etc/modules "^$module$"
done
fcopy -Mv /etc/hostname || echo $HOSTNAME > $target/etc/hostname
ainsl -av /etc/mailname ${HOSTNAME}
if [ ! -e $target/etc/adjtime ]; then
printf "0.0 0 0.0\n0\nUTC" > $target/etc/adjtime
fi
if [ "$UTC" = "yes" ]; then
sed -i -e 's:^LOCAL$:UTC:' $target/etc/adjtime
else
sed -i -e 's:^UTC$:LOCAL:' $target/etc/adjtime
fi
# enable linuxlogo
#if [ -f $target/etc/inittab ]; then
# sed -i -e 's#/sbin/getty 38400#/sbin/getty -f /etc/issue.linuxlogo 38400#' ${target}/etc/inittab
#elif [ -f $target/lib/systemd/system/getty@.service ]; then
# sed -i -e 's#sbin/agetty --noclear#sbin/agetty -f /etc/issue.linuxlogo --noclear#' $target/lib/systemd/system/getty@.service
#fi
if [ ! -f $target/etc/machine-id -a -f $target/bin/systemd-machine-id-setup ]; then
$ROOTCMD systemd-machine-id-setup
fi
ln -fs /proc/mounts $target/etc/mtab
rm -f $target/etc/dpkg/dpkg.cfg.d/fai
[ $FAI_ACTION = "install" -a -f /etc/fai/fai.conf ] && cp /etc/fai/fai.conf $target/etc/fai/fai.conf
ainsl -av /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC"
fcopy -Miv /etc/fai/fai.conf
echo "add orchard user"
$ROOTCMD adduser -c "orchard user" -d /home/orchard -s /bin/bash orchard
$ROOTCMD usermod -p "$ORCHARDPW" orchard
exit $error
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment