File config.sh of Package Teres-I-image

#!/bin/bash
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile

mkdir /var/lib/misc/reconfig_system

#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$kiwi_iname]-[$kiwi_profiles]..."

#======================================
# Debug
#--------------------------------------
#systemctl enable debug-shell.service

#======================================
# add missing fonts
#--------------------------------------
CONSOLE_FONT="eurlatgr.psfu"

#======================================
# Mount system filesystems
#--------------------------------------
baseMount

#======================================
# Setup baseproduct link
#--------------------------------------
suseSetupProduct

#======================================
# Specify default runlevel
#--------------------------------------
baseSetRunlevel 3

#======================================
# Add missing gpg keys to rpm
#--------------------------------------
suseImportBuildKey

#======================================
# Activate services
#--------------------------------------
suseInsertService sshd

#======================================
# Remove doc files
#--------------------------------------
baseStripDocs

#======================================
# Sysconfig Update
#--------------------------------------
# Systemd controls the console font now
echo FONT="$CONSOLE_FONT" >> /etc/vconsole.conf

#======================================
# SSL Certificates Configuration
#--------------------------------------
echo '** Rehashing SSL Certificates...'
update-ca-certificates

if [ ! -s /var/log/zypper.log ]; then
	> /var/log/zypper.log
fi

#======================================
# Import trusted rpm keys
#--------------------------------------
for i in /usr/lib/rpm/gnupg/keys/gpg-pubkey*asc; do
    # importing can fail if it already exists
    rpm --import $i || true
done

#=====================================
# Configure snapper
#-------------------------------------
if [ "$kiwi_btrfs_root_is_snapshot" = 'true' ]; then
        echo "creating initial snapper config ..."
        # we can't call snapper here as the .snapshots subvolume
        # already exists and snapper create-config doens't like
        # that.
        cp /etc/snapper/config-templates/default /etc/snapper/configs/root
        # Change configuration to match SLES12-SP1 values
        sed -i -e '/^TIMELINE_CREATE=/s/yes/no/' /etc/snapper/configs/root
        sed -i -e '/^NUMBER_LIMIT=/s/50/10/'     /etc/snapper/configs/root

        baseUpdateSysConfig /etc/sysconfig/snapper SNAPPER_CONFIGS root
fi

#=====================================
# Enable ntpd if installed
#-------------------------------------
if [ -f /etc/ntp.conf ]; then
	suseInsertService ntpd
	for i in 0 1 2 3; do
	    echo "server $i.opensuse.pool.ntp.org iburst" >> /etc/ntp.conf
	done
fi

#======================================
# Configure hardware specifics
#--------------------------------------
# Load Wifi driver ASAP
echo 'force_drivers+=" rfkill cfg80211 mmc_core r8723bs sunxi-mmc "' \
    > /etc/dracut.conf.d/15-teres-wifimodules.conf
echo 'install_items+=" /lib/firmware/rtlwifi/rtl8723bs_nic.bin "' \
    >> /etc/dracut.conf.d/15-teres-wifimodules.conf

systemctl disable wicked
systemctl enable NetworkManager

baseCleanMount

exit 0
openSUSE Build Service is sponsored by