File config.sh of Package vanamo-kiosk

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

if [ -z "${kiwi_iname}" ]
then
    kiwi_iname="vanamo"
fi

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

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

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

#======================================
# Activate services
#--------------------------------------

echo "** Running ldconfig..."
/sbin/ldconfig

#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3

#==========================================
# remove package docs
#------------------------------------------
rm -rf /usr/share/doc/packages/*
rm -rf /usr/share/doc/manual/*
rm -rf /opt/kde*

#======================================
# only basic version of vim is
# installed; no syntax highlighting
#--------------------------------------
sed -i -e's/^syntax on/" syntax on/' /etc/vimrc

# Configs from https://build.opensuse.org/package/view_file/Virtualization:Appliances:Images:openSUSE-Leap-15.1/openSUSE-Leap-15.1-JeOS/config.sh
baseUpdateSysConfig /etc/sysconfig/network/dhcp DHCLIENT_SET_HOSTNAME no

# Enable jeos-firstboot
mkdir -p /var/lib/YaST2
touch /var/lib/YaST2/reconfig_system

# Set GRUB2 to boot graphically (bsc#1097428)
sed -Ei "s/#?GRUB_TERMINAL=.+$/GRUB_TERMINAL=gfxterm/g" /etc/default/grub
sed -Ei "s/#?GRUB_GFXMODE=.+$/GRUB_GFXMODE=auto/g" /etc/default/grub
sed -Ei "s/GRUB_DISTRIBUTOR=.+$/GRUB_DISTRIBUTOR=\"Vanamo Kiosk\"/" /etc/default/grub
sed -Ei "s/GRUB_TIMEOUT=.+$/GRUB_TIMEOUT=0/" /etc/default/grub

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

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

# 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

# Disable recommends on virtual images (keep hardware supplements, see bsc#1089498)
sed -i 's/.*solver.onlyRequires.*/solver.onlyRequires = true/g' /etc/zypp/zypp.conf

# Disable installing documentation
sed -i 's/.*rpm.install.excludedocs.*/rpm.install.excludedocs = yes/g' /etc/zypp/zypp.conf

exit 0
openSUSE Build Service is sponsored by