File images.sh of Package vanamo-kiosk
#!/bin/sh
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
if [ -z "${kiwi_iname}" ]
then
kiwi_iname="vanamo"
fi
if [ -z "${kiwi_profiles}" ]
then
kiwi_profiles="XEN"
fi
echo "Configure image: [$kiwi_iname]..."
#==========================================
# setup build day
#------------------------------------------
baseSetupBuildDay
# As these can be very badly chmodded chmod corretly
chmod a+rx /etc/audit
chmod a+rx /etc/firewalld
chmod a+rx /etc/nginx
chmod a+rx /etc/php7
chmod a+rx /etc/php7/conf.d
chmod a+rx /etc/php7/fpm
chmod a+rx /etc/php7/fpm/php-fpm.d
chmod a+rx /etc/sysconfig
chmod a+rx /etc/sysconfig/SuSEfirewall2.d
chmod a+rx /etc/sysconfig/SuSEfirewall2.d/services
chmod a+rx /etc/uwsgi
chmod a+rx /etc/uwsgi/vassals
chmod a+rx /srv
chmod a+rx /srv/www
chmod a+rx /srv/www/htdocs
chmod a+rx /srv/www/htdocs/localhost
chmod a+rx /usr/*
chmod a+rx /usr/share/tmpl
chmod a+rx /usr/share/defaults
chmod a+rx /usr/lib/systemd
chmod a+rx /usr/lib/systemd/system
chmod a+rx /usr/share/lightdm/lightdm.conf.d/
chmod a+rx /usr/share/lightdm
chmod a+rx /etc/X11/xorg.conf.d
chmod a+rx /etc/X11/xinit/xinitrc.d
chmod a+rx /etc/X11/xinit
chmod a+rx /etc/X11
chmod a+rx /etc/xdg/autostart
chmod a+rx /etc/xdg
chown -R nginx.nginx /srv/www/htdocs
# Make sure that we use Basic SSL rpm stuff
rm /etc/nginx/nginx.conf
ln -sf /etc/nginx/nginx.conf.basicssl /etc/nginx/nginx.conf
chmod a+rx /etc/X11/xinit/xinitrc.d/*.sh
chmod a+r /usr/share/lightdm/lightdm.conf.d/*.conf
chmod a+r /etc/X11/xorg.conf.d/*.conf
chown -R vanamo.users /home/vanamo
chmod -R u+rwx /home/vanamo
chmod -R og-rwx /home/vanamo
suseInsertService sshd
suseInsertService rng-tools
# suseInsertService firewalld
# NGinx is enabled in jeos-firstboot after
# cert is done
# suseInsertService nginx
# suseInsertService php-fpm
# suseInsertService uwsgi
# suseInsertService hddtemp
systemctl mask emergency.service
systemctl mask emergency.target
systemctl mask systemd-firstboot.service
systemctl mask YaST2-Firstboot.service
systemctl enable jeos-firstboot.service
rpm -e wicked
systemctl --force enable NetworkManager.service > /dev/null
# Workaround for jeos-first boot circular dependency
# and we are using NetworkManager anyway
sed -i "s/Before=wicked.service/# Before=wicked.service/" /usr/lib/systemd/system/jeos-firstboot.service
# Make sure that repo URL are correct
# as now they do not have opensSUSE_Leap_ front
# anymore from 15.4
sed -i "s/openSUSE_Leap_//g" /etc/zypp/repos.d/*.repo
# Remove unneeded sysconfig as this is done
# in Yast or jeos-firstrun with timedatactl
rm -f /etc/sysconfig/clock
# Set time to UTC
cat <<EOF > "/etc/adjtime"
0
UTC
EOF
exit 0