Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
OBS:Server:2.4
OBS-WorkerOnly-pxe-xen
config.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File config.sh of Package OBS-WorkerOnly-pxe-xen
#!/bin/bash #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile #====================================== # Greeting... #-------------------------------------- echo "Configure image: [$kiwi_iname]..." #====================================== # Activate services #-------------------------------------- ifup lo suseActivateDefaultServices suseInsertService boot.device-mapper suseInsertService slpd suseInsertService ntp # OBS worker suseInsertService obsworker suseInsertService obsstoragesetup #====================================== # SuSEconfig #-------------------------------------- suseConfig # no gfx boot menu, no error message please sed -i /^gfxmenu/d /boot/grub/menu.lst # setup initrd for XEN workers sed -i -e 's/^DOMU_INITRD_MODULES="/DOMU_INITRD_MODULES="loop dm-mod dm-snapshot binfmt_misc fuse kqemu squashfs ext2 ext3 ext4 reiserfs btrfs fat vfat nf_conntrack_ipv6 /' /etc/sysconfig/kernel sed -i -e 's/^NO_KMS_IN_INITRD=.*/NO_KMS_IN_INITRD="yes"/' /etc/sysconfig/kernel # For save booting, there is some race between blogd and console setup in 11.4 atm sed -i -e 's/^RUN_PARALLEL=.*/RUN_PARALLEL="no"/' /etc/sysconfig/boot # configure network cat >> /etc/sysconfig/network/config <<EOF NETCONFIG_MODULES_ORDER="dns-resolver dns-bind ntp-runtime" NETCONFIG_DNS_POLICY="auto" NETCONFIG_DNS_FORWARDER="resolver" NETCONFIG_NIS_SETDOMAINNAME="yes" NETCONFIG_NTP_POLICY="auto" EOF # worker greeting string echo 'Welcome to OBS Worker Appliance, based on openSUSE - Kernel \r (\l).' > /etc/issue echo >> /etc/issue # runlevel 3 as default sed -i 's/^id:5:initdefault:/id:3:initdefault:/' /etc/inittab # enable autosetup sed -i 's,OBS_API_AUTOSETUP=.*,OBS_API_AUTOSETUP="yes",' /etc/sysconfig/obs-server sed -i 's,OBS_STORAGE_AUTOSETUP=.*,OBS_STORAGE_AUTOSETUP="yes",' /etc/sysconfig/obs-* sed -i 's,OBS_SETUP_WORKER_PARTITIONS=.*,OBS_SETUP_WORKER_PARTITIONS="use_obs_vg",' /etc/sysconfig/obs-* # hardwired ntp server config, in case dhcp distribution of ntp config is not working echo "" >> /etc/ntp.conf echo "server ntp1" >> /etc/ntp.conf echo "multicastclient" >> /etc/ntp.conf # allow root login via serial console for debugging echo "" >> /etc/securetty echo "# for debugging purposes" >> /etc/securetty echo ttyS0 >> /etc/securetty echo "" >> /etc/inittab echo "S0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt102" >> /etc/inittab # bug ? chown root.root /var/lib/empty #====================================== # Configure OBS to use /obs by default #-------------------------------------- sed -i 's,/srv/obs,/obs,g' /usr/lib/obs/server/BSConfig.pm sed -i 's,.*our $serviceserve.*,our $serviceserver = "http://$hostname:5152";,' /usr/lib/obs/server/BSConfig.pm sed -i 's,^our $repodownload.*,our $repodownload = "http://$hostname:82/";,' /usr/lib/obs/server/BSConfig.pm sed -i 's,^OBS_RUN_DIR=.*,OBS_RUN_DIR="/obs/run",' /etc/sysconfig/obs-server sed -i 's,^OBS_LOG_DIR=.*,OBS_LOG_DIR="/obs/log",' /etc/sysconfig/obs-server sed -i 's,^datadir.=.*,datadir = /obs/MySQL,' /etc/my.cnf sed -i '/^\[mysqld_multi\]/adatadir = /obs/MySQL' /etc/my.cnf # config of openSUSE 11.4 does not come with a default dir for its default mode # signing setup sed -i 's,.*our $gpg_standard_key.*,our $gpg_standard_key = "/obs/obs-default-gpg.asc";,' /usr/lib/obs/server/BSConfig.pm sed -i 's,.*our $keyfile.*,our $keyfile = "/obs/obs-default-gpg.asc";,' /usr/lib/obs/server/BSConfig.pm sed -i 's,.*our $sign = .*,our $sign = "/usr/bin/sign";,' /usr/lib/obs/server/BSConfig.pm sed -i 's,.*our $forceprojectkeys.*,our $forceprojectkeys = 1;,' /usr/lib/obs/server/BSConfig.pm chmod 4755 /usr/bin/sign #====================================== # Add Default Repositories #-------------------------------------- zypper ar http://download.opensuse.org/update/12.2/ openSUSE:12.2:Update zypper ar http://download.opensuse.org/repositories/openSUSE:12.2/standard openSUSE:12.2 zypper ar http://download.opensuse.org/repositories/openSUSE:Tools:2.4/openSUSE_12.2 openSUSE:Tools:2.4 #====================================== # Umount kernel filesystems #-------------------------------------- baseCleanMount exit 0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor