Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:infrastructure:Images:openSUSE_Leap_15.2
jeos
config.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File config.sh of Package jeos
#!/bin/bash #================ # FILE : config.sh #---------------- # PROJECT : OpenSuSE KIWI Image System # COPYRIGHT : (c) 2006 SUSE LINUX Products GmbH. All rights reserved # : # AUTHOR : Marcus Schaefer <ms@suse.de> # : # BELONGS TO : Operating System images # : # DESCRIPTION : configuration script for SUSE based # : operating systems # : # : # STATUS : BETA #---------------- #====================================== # Variables... #-------------------------------------- DISTVERSION='15.2' DISTURL='http://download.infra.opensuse.org' GATEWAY='192.168.47.254' DNS='192.168.47.101 192.168.47.102' SYSLOG_SERVER='192.168.47.7' MONITORING_SERVER="$SYSLOG_SERVER" MAIL_SERVER='192.168.47.4' #====================================== # Functions... #-------------------------------------- test -f /.kconfig && . /.kconfig test -f /.profile && . /.profile #====================================== # Greeting... #-------------------------------------- echo "Configure image: [$kiwi_iname]..." #====================================== # Mount system filesystems #-------------------------------------- baseMount #====================================== # Setup baseproduct link #-------------------------------------- suseSetupProduct #====================================== # Add missing gpg keys to rpm #-------------------------------------- suseImportBuildKey #====================================== # Setup default target, multi-user #-------------------------------------- baseSetRunlevel 3 #====================================== # Remove all locales beside: #-------------------------------------- baseStripLocales en de #====================================== # Remove all translations beside: #-------------------------------------- baseStripTranslations en de #====================================== # SuSEconfig #-------------------------------------- suseConfig #====================================== # Remove yast if not in use #-------------------------------------- suseRemoveYaST # # Repos # # /etc/zypp/zypp.conf sed -e "s@# download.use_deltarpm.*@download.use_deltarpm = false@" \ -e "s@.*solver.dupAllowVendorChange.*@solver.dupAllowVendorChange = false@" \ -e "s@.*solver.onlyRequires.*@solver.onlyRequires = true@" \ -i /etc/zypp/zypp.conf # RPM keys rm -rf /tmp/keys mkdir /tmp/keys # openSUSE:infrastructure key eae4fd92 cat << EOF >> /tmp/keys/t1 -----BEGIN PGP PUBLIC KEY BLOCK----- Version: rpm-4.11.2 (NSS-3) mQGiBFCt5AsRBAC5Fypr7hYfEn0p1Bydroe6KTbU9Y54eV+ExJx6kr0C8C5o8rqx FN9Xzuax0RhmoqLEhbZfl4A7prOMGDb+BeFA0HxmRAclIBHpXUbPXjad+ldQzi5Z p3f1CUzdl3S7A5ARAaOAlV4E1EXwg0HledV3ugxN/oZ1aPISTc8BriO9ewCgtqhS L8tEz1QpUKcF4OrPlVF7KxUD/2iP4a5o65pSgUhFyta8KKedChFZl8/vrbtsDxSj I4Y2BQn3XmvVV6zJadnA2Y+2VwBlreNRekmEOwdK7OsZM6gsfDFqkewHn4lIExgu ZKdQXLKXXXv8oFTvZYZPt0tldbjTJXnARt/kepRlCzxl/kQf3OWMdYFPLRDEg1xI Nnt4A/9Lb2VNj+iigeQVrU2dWJilXpdYSiPdGKwkqa7RqkgTymd6s84IJq8LxAL+ gg1GtXYxqLxQoCnM3YZ87F2B9lgSZ5kuZxa903Ra4CSXp1PDVmBsIUsz6q7vkIzq bBiDCgNe2c5LlRxIk6UeRMfc7PLuNR4WbtvF3qOCQRNYFSL137Qyb3BlblNVU0Ug T0JTIFByb2plY3QgPG9wZW5TVVNFQGJ1aWxkLm9wZW5zdXNlLm9yZz6IZgQTEQIA JgUCWOVM4wIbAwUJDFYY2AYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEPmot5vq 5P2S0SgAoJ0dttuPxs/orxcWEDGRlOVYmmnwAJ9oA7v26lvrZSV5uG1jN6fVBkOX tIhGBBMRAgAGBQJQreQLAAoJEDswEbdrnWUjeewAoKb0I64bp1a8Xchv1PNTAmBi zEk4AJ9gnxXQLg3B5W4FwWYIRumX/qfDaA== =Bvhx -----END PGP PUBLIC KEY BLOCK----- EOF rpm --import /tmp/keys/t1 rm -rf /tmp/keys # add repos rm -rf /etc/zypp/repos.d/ zypper ar --no-check ${DISTURL}/distribution/leap/${DISTVERSION}/repo/oss/ repo-oss zypper ar --no-check --refresh ${DISTURL}/update/leap/${DISTVERSION}/oss/ repo-update-oss zypper ar -p 100 --no-check --refresh ${DISTURL}/repositories/openSUSE:/infrastructure/openSUSE_Leap_${DISTVERSION}/ openSUSE:infrastructure # # Network # ifup lo echo "default $GATEWAY - -" >> /etc/sysconfig/network/routes # DNS sed -e "s@NETCONFIG_DNS_RESOLVER_OPTIONS=@\"\(.*\)\"@NETCONFIG_DNS_RESOLVER_OPTIONS=\"attempts:1 timeout:1\"@" \ -e "s@NETCONFIG_DNS_STATIC_SERVERS=@\"\(.*\)\"@NETCONFIG_DNS_STATIC_SERVERS=\"$DNS\"@" \ -e "s@NETCONFIG_DNS_STATIC_SEARCHLIST=@\"\(.*\)\"@NETCONFIG_DNS_STATIC_SEARCHLIST=\"\"@" \ -i /etc/sysconfig/network/config echo "search infra.opensuse.org opensuse.org" >> /etc/resolv.conf for server in $DNS; do echo "nameserver $server" >> /etc/resolv.conf done echo "options attempts:1 timeout:1" >> /etc/resolv.conf # # Boot setup # # adapt dracut echo "nowaitforswap=yes" >> /etc/dracut.conf.d/10-disable_swap.conf # allow root login via serial console for debugging echo "" >> /etc/securetty echo "# for debugging purposes" >> /etc/securetty echo ttyS0 >> /etc/securetty echo ttyS1 >> /etc/securetty echo ttyS2 >> /etc/securetty echo hvc0 >> /etc/securetty echo console >> /etc/securetty # # Services # # remote logging echo "${SYSLOG_SERVER} syslog.infra.opensuse.org syslog monitor" >> /etc/hosts cat << EOF >> /etc/rsyslog.d/remote.conf \$WorkDirectory /var/spool/rsyslogi \$ActionQueueFileName uniqName \$ActionQueueMaxDiskSpace 1g \$ActionQueueSaveOnShutdown on \$ActionQueueType LinkedList \$ActionResumeRetryCount -1 *.* @@syslog.infra.opensuse.org EOF # Monitoring (check_mk - nrpe) if [ ! -f /etc/xinetd.d/check_mk ]; then cat >> /etc/xinetd.d/check_mk << EOF service check_mk { type = UNLISTED port = 6556 socket_type = stream protocol = tcp wait = no user = root server = /usr/bin/check_mk_agent only_from = 127.0.0.1 $MONITORING_SERVER log_on_success = disable = no } EOF else sed -e "s@.*only_from.*@ only_from = 127.0.0.1 $MONITORING_SERVER@" -i /etc/xinetd.d/check_mk fi sed -e "s@.*only_from.*@ only_from = 127.0.0.1 $MONITORING_SERVER@" \ -e "s@.*disable.*@ disable = no@" -i /etc/xinetd.d/nrpe # # /etc/sysconfig # # security sed -e "s@PERMISSION_SECURITY=.*@PERMISSION_SECURITY=\"secure local\"@" \ -i /etc/sysconfig/security chkstat --system --set # cron sed -e "s@DAILY_TIME=.*@DAILY_TIME=\"19:30\"@" \ -i /etc/sysconfig/cron # postfix sed -e "s@POSTFIX_RELAYHOST=.*@POSTFIX_RELAYHOST=\"[$MAIL_SERVER]\"@" \ -e "s@POSTFIX_NULLCLIENT=.*@POSTFIX_NULLCLIENT=\"yes\"@" \ -e "s@POSTFIX_BASIC_SPAM_PREVENTION=.*@POSTFIX_BASIC_SPAM_PREVENTION=\"hard\"@" \ -e "s@POSTFIX_REGISTER_SLP=.*@POSTFIX_REGISTER_SLP=\"no\"@" \ -e "s@POSTFIX_ADD_MYNETWORKS_STYLE=.*@POSTFIX_ADD_MYNETWORKS_STYLE=\"host\"@" \ -i /etc/sysconfig/postfix /usr/sbin/config.postfix # enable important services suseActivateDefaultServices for i in chronyd haveged sshd xinetd rsyslogd postfix ; do baseInsertService $i done for i in lvm2-lvmetad.service ; do baseRemoveService $i done #====================================== # 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