File config.sh of Package gnome-next-live
#!/bin/bash
#================
# FILE          : config.sh
#----------------
# PROJECT       : OpenSuSE KIWI Image System
# COPYRIGHT     : (c) 2006,2007,2008 SUSE LINUX Products GmbH. All rights reserved
#               :
# AUTHOR        : Marcus Schaefer <ms@suse.de>, Stephan Kulow <coolo@suse.de>
#               :
# LICENSE       : BSD
#======================================
# Functions...
#--------------------------------------
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#set -e
set -x
exec | tee /var/log/config.log
exec 2>&1
pl=`rpmqpack | grep package-lists-` || true
test -z "$pl" || rpm -e $pl
#======================================
# Greeting...
#--------------------------------------
echo "Configure image: [$name]..."
if test -n "$use_special_hacks"; then
#======================================
# Load sound drivers by default
#--------------------------------------
perl -ni -e 'm,^blacklist snd-, || print;' \
	/etc/modprobe.d/50-blacklist.conf
# and unmute their mixers.
perl -pi -e 's,/sbin/alsactl -F restore,/bin/set_default_volume -f,;' \
	/etc/udev/rules.d/40-alsa.rules
fi
#--------------------------------------
# these two we want to disable for policy reasons
for i in sshd cron wicked purge-kernels; do
       systemctl -f disable $i
done
#ln -s '/etc/systemd/system/clicfs.service' '/etc/systemd/system/multi-user.target.wants/clicfs.service'
cd /
#patch -p0 < /etc/YaST2/liveinstall.patch
#if test -f /etc/YaST2/firstboot.xml -a -f /var/lib/livecd/config-firstboot.patch; then
#   patch -f /etc/YaST2/firstboot.xml /var/lib/livecd/config-firstboot.patch
#fi
# disabled for now - if you reenable, don't forget correct_live_install
# bnc#382158
# patch -p0 < /etc/YaST2/policy.patch
for i in /rpmkeys/gpg*.asc /usr/lib/rpm/gnupg/keys/*.asc; do 
   # the import fails if kiwi already had this key
   rpm --import $i || true
   rm $i
done
rmdir /rpmkeys
insserv
rm -rf /var/cache/zypp/raw/*
bash -x /var/lib/livecd/geturls.sh
rm /var/lib/livecd/geturls.sh
#======================================
# /etc/sudoers hack to fix #297695 
# (Installation Live CD: no need to ask for password of root)
#--------------------------------------
sed -i -e "s/ALL ALL=(ALL) ALL/ALL ALL=(ALL) NOPASSWD: ALL/" /etc/sudoers 
chmod 0440 /etc/sudoers
/usr/sbin/useradd -m -u 999 linux -c "Live-CD User" -p ""
# delete passwords
passwd -d root
passwd -d linux
# empty password is ok
pam-config -a --nullok
: > /var/log/zypper.log
mv /var/lib/livecd/*.pdf /home/linux || true
rmdir /var/lib/livecd || true
chown -R linux /home/linux
chown root:root /root
#======================================
# SuSEconfig
#--------------------------------------
for script in /usr/share/opensuse-kiwi/live_user_scripts/*.sh; do
  if test -f $script; then
     su - linux -c "/bin/bash $script"
  fi
done
rm -rf /var/cache/zypp/packages
# bug 544314, we only want to disable the bit in common-auth-pc
sed -i -e 's,^\(.*pam_gnome_keyring.so.*\),#\1,'  /etc/pam.d/common-auth-pc
#USB /usr/bin/correct_live_for_reboot usb
#USB /usr/bin/correct_live_install usb
# bug 890800
rm /etc/systemd/system/default.target.wants/YaST2-Firstboot.service
rm /etc/systemd/system/default.target.wants/YaST2-Second-Stage.service
rm /usr/lib/systemd/system/YaST2-Second-Stage.service
rm /usr/lib/systemd/system/YaST2-Firstboot.service
# bug 876555, remove this once the package is updated
ln -s /usr/share/YaST2/theme/openSUSE /usr/share/YaST2/theme/current
# Add live-installer.desktop
mkdir -p /home/linux/Desktop
cp /usr/share/applications/YaST2/live-installer.desktop /home/linux/Desktop/
chown linux /home/linux -R
chmod +x /home/linux/Desktop/live-installer.desktop
echo '127.0.0.2       linux.site linux' >> /etc/hosts
baseUpdateSysConfig /etc/sysconfig/displaymanager DISPLAYMANAGER_AUTOLOGIN linux
baseUpdateSysConfig /etc/sysconfig/keyboard KEYTABLE us.map.gz
baseUpdateSysConfig /etc/sysconfig/keyboard YAST_KEYBOARD english-us,pc104
baseUpdateSysConfig /etc/sysconfig/language RC_LANG en_US.UTF-8
baseUpdateSysConfig /etc/sysconfig/console CONSOLE_FONT "eurlatgr.psfu"
/usr/bin/systemctl -f enable NetworkManager.service
/usr/bin/systemctl -f enable gdm.service
# Enable NTP service
/usr/bin/systemctl -f enable chronyd.service
# bug 891183
baseUpdateSysConfig /etc/sysconfig/yast2 WANTED_GUI qt
#Disable journal write to disk in live mode, bug 950999
echo "Storage=volatile" >> /etc/systemd/journald.conf
# added icons on desktop in
# /usr/share/glib-2.0/schemas/openSUSE-branding.gschema.override
#glib-compile-schemas /usr/share/glib-2.0/schemas/
#set default runlevel to 5
ln -snf /usr/lib/systemd/system/graphical.target /etc/systemd/system/default.target || true