diff options
Diffstat (limited to 'config.sh')
| -rwxr-xr-x | config.sh | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -63,6 +63,9 @@ if [[ "$kiwi_profiles" == *"Live"* ]]; then if [[ "$kiwi_profiles" == *"KDE"* ]]; then echo 'livesys_session="kde"' > /etc/sysconfig/livesys fi + if [[ "$kiwi_profiles" == *"SoaS"* ]]; then + echo 'livesys_session="soas"' > /etc/sysconfig/livesys + fi fi #====================================== @@ -192,4 +195,46 @@ if [[ "$kiwi_profiles" == *"Container"* ]]; then fi fi +if [[ "$kiwi_profiles" == *"SoaS"* ]]; then +# Get proper release naming in the control panel +cat >> /boot/olpc_build << EOF +Sugar on a Stick +EOF +cat /etc/fedora-release >> /boot/olpc_build + +# Rebuild initrd for Sugar boot screen -- TODO: Switch to kiwi declarative stanza +KERNEL_VERSION=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n') +/usr/sbin/plymouth-set-default-theme sugar +sed -i -r 's/(omit_dracutmodules\+\=.*) plymouth (.*)/\1 \2/' /etc/dracut.conf.d/99-liveos.conf +dracut --force-add plymouth -N -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION + +# Note that running rpm recreates the rpm db files which aren't needed or wanted +rm -f /var/lib/rpm/__db* + +cat > /etc/sysconfig/desktop <<EOF +PREFERRED=/usr/bin/sugar +DISPLAYMANAGER=/usr/sbin/lightdm +EOF + +# set up lightdm autologin +sed -i 's/^#autologin-user=.*/autologin-user=liveuser/' /etc/lightdm/lightdm.conf +sed -i 's/^#autologin-user-timeout=.*/autologin-user-timeout=0/' /etc/lightdm/lightdm.conf + +# Don't use the default system user (in SoaS liveuser) as nick name +# Disable the logout menu item in Sugar +# Enable Sugar power management +cat >/usr/share/glib-2.0/schemas/sugar.soas.gschema.override <<EOF +[org.sugarlabs.user] +default-nick='disabled' + +[org.sugarlabs] +show-logout=false + +[org.sugarlabs.power] +automatic=true +EOF + +/usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas +fi + exit 0 |