Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dziallas <sebastian@when.com>2009-07-31 11:00:25 (GMT)
committer Sebastian Dziallas <sebastian@when.com>2009-07-31 11:00:25 (GMT)
commit105bb9fdaa7fb899d933adfb06508bf9681b4d99 (patch)
tree99b2cd2a3e14e60212ca739dee9987fda827f41e
parent2a5a0d6019864e916432f46e68511add5084ca50 (diff)
switch to olpc-dm and rename user
-rw-r--r--soas-base.ks13
-rw-r--r--soas-sugar.ks117
2 files changed, 31 insertions, 99 deletions
diff --git a/soas-base.ks b/soas-base.ks
index 15c45d1..f86f0d4 100644
--- a/soas-base.ks
+++ b/soas-base.ks
@@ -205,7 +205,7 @@ mountPersistentHome() {
# we should make that the real /home. useful for mtd device on olpc
if [ -d /home/home ]; then mount --bind /home/home /home ; fi
[ -x /sbin/restorecon ] && /sbin/restorecon /home
- if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
+ if [ -d /home/olpc ]; then USERADDARGS="-M" ; fi
}
findPersistentHome() {
@@ -239,9 +239,12 @@ if [ -n "\$configdone" ]; then
exit 0
fi
-# add fedora user with no passwd
-action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
-passwd -d liveuser > /dev/null
+# add soas user with no passwd
+/usr/sbin/useradd -m -c "soas user" -G audio,wheel olpc
+/usr/bin/passwd -d olpc
+
+# allow sudo for olpc user
+echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
# turn off firstboot for livecd boots
chkconfig --level 345 firstboot off 2>/dev/null
@@ -388,7 +391,7 @@ Section "Screen"
EndSection
FOE
-echo "Xft.dpi: 150" > /home/liveuser/.Xresources
+echo "Xft.dpi: 150" > /home/olpc/.Xresources
fi
diff --git a/soas-sugar.ks b/soas-sugar.ks
index 3162f28..cd7ec51 100644
--- a/soas-sugar.ks
+++ b/soas-sugar.ks
@@ -27,7 +27,7 @@ gvfs
vte
# display manager
-slim
+olpc-utils
# e-mail client
alpine
@@ -64,88 +64,16 @@ gstreamer-plugins-espeak
%end
-%post --nochroot
-
-# fructose collection
-ASLO="$ASLO 4024" # Browse
-ASLO="$ASLO 4027" # Turtle Art
-ASLO="$ASLO 4028" # Read
-ASLO="$ASLO 4032" # Imageviewer
-ASLO="$ASLO 4041" # Pippy
-ASLO="$ASLO 4043" # Terminal
-ASLO="$ASLO 4045" # Jukebox
-ASLO="$ASLO 4056" # Log
-ASLO="$ASLO 4069" # Chat
-ASLO="$ASLO 4076" # Calculator
-ASLO="$ASLO 4201" # Write
-
-# honey selection
-ASLO="$ASLO 4029" # IRC
-ASLO="$ASLO 4034" # Moon
-ASLO="$ASLO 4035" # Read ETexts
-ASLO="$ASLO 4037" # CartoonBuilder
-ASLO="$ASLO 4038" # Speak
-ASLO="$ASLO 4039" # ViewSlides
-ASLO="$ASLO 4041" # Pippy
-ASLO="$ASLO 4042" # InfoSlicer
-ASLO="$ASLO 4044" # FlipSticks
-ASLO="$ASLO 4046" # JigsawPuzzle
-ASLO="$ASLO 4047" # SliderPuzzle
-ASLO="$ASLO 4050" # Colors
-ASLO="$ASLO 4054" # FreeCell
-ASLO="$ASLO 4063" # Memorize
-ASLO="$ASLO 4064" # JokeMachine
-ASLO="$ASLO 4073" # StoryBuilder
-ASLO="$ASLO 4074" # Poll
-ASLO="$ASLO 4078" # Labyrinth
-ASLO="$ASLO 4081" # Record
-ASLO="$ASLO 4082" # Paint
-ASLO="$ASLO 4089" # Library
-ASLO="$ASLO 4191" # Clock
-ASLO="$ASLO 4193" # Physics
-ASLO="$ASLO 4194" # Get Internet Archive Books
-ASLO="$ASLO 4203" # Update
-
-WD=$PWD
-BUNDLES_DIR=$INSTALL_ROOT/usr/share/sugar/bundles
-
-mkdir -p $BUNDLES_DIR
-cd $BUNDLES_DIR
-
-for id in $ASLO ; do
- curl -L http://activities.sugarlabs.org/en-US/sugar/downloads/latest/$id > $id.xo
-done
-
-# get the script to install the activities
-curl -O http://git.sugarlabs.org/projects/soas/repos/mainline/blobs/raw/2d1057e6d8e74aecfa82c0b8e51a2c8d772a7923/install-activity.py
-
-# pull sample content for the journal
-PDFS="$PDFS south_america.pdf"
-PDFS="$PDFS africa.pdf"
-PDFS="$PDFS asia.pdf"
-PDFS="$PDFS central_america.pdf"
-PDFS="$PDFS europe.pdf"
-PDFS="$PDFS middle_east.pdf"
-PDFS="$PDFS north_america.pdf"
-PDFS="$PDFS oceania.pdf"
-PDFS="$PDFS southeast_asia.pdf"
-
-for pdf in $PDFS ; do
- curl -O http://dev.sugarlabs.org/raw-attachment/ticket/840/$pdf
-done
-
-# get sample content setup script directly from git
-curl -O http://git.sugarlabs.org/projects/soas/repos/mainline/blobs/raw/8ad00566985860f9891aea714c74e5430e9c395d/copy-to-datastore.py
-
-chown -R 500:500 $BUNDLES_DIR
-cd $WD
-
-%end
-
%post
+# make sure to remove olpc-configure
+rm -f /etc/rc.d/init.d/diskspacecheck
+rm -f /etc/rc.d/init.d/diskspacerecover
+rm -f /etc/rc.d/init.d/olpc-configure
+rm -f /etc/X11/xorg-*.conf
+
cat > /etc/sysconfig/desktop <<EOF
-DISPLAYMANAGER=/usr/bin/slim-dynwm
+DISPLAYMANAGER=/usr/sbin/olpc-dm
EOF
cat >> /etc/rc.d/init.d/livesys << EOF
@@ -170,18 +98,19 @@ enabled=1
gpgcheck=0
FOE
-# setup auto-login for slim
-cat >> /etc/slim.conf << FOE
-auto_login yes
-default_user liveuser
-FOE
-
# fix permissions on home directory
-chown liveuser /home/liveuser
-chgrp liveuser /home/liveuser
+chown olpc /home/olpc
+chgrp olpc /home/olpc
+
+# make sugar default
+cat > /home/olpc/.dmrc <<EOF
+[Desktop]
+Layout=olpc
+Session=sugar
+EOF
# setup Xclients
-cat >> /home/liveuser/.Xclients << FOE
+cat >> /home/olpc/.Xclients << FOE
xsetroot -def
eval \\\$(dbus-launch --sh-syntax --exit-with-session)
@@ -196,8 +125,8 @@ fi
SUGAR_SCALING=\\\$SUGAR_SCALING sugar
FOE
-chmod a+x /home/liveuser/.Xclients
-chown liveuser:liveuser /home/liveuser/.Xclients
+chmod a+x /home/olpc/.Xclients
+chown olpc:olpc /home/olpc/.Xclients
# disable the logout menu item in Sugar
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /desktop/sugar/show_logout false >/dev/null
@@ -225,19 +154,19 @@ FOE
# unzip activities and clean up
cd /usr/share/sugar/bundles
-ACTIVITY_DIR=/home/liveuser/Activities
+ACTIVITY_DIR=/home/olpc/Activities
mkdir -p \$ACTIVITY_DIR
chown -R 500:500 \$ACTIVITY_DIR
chmod a+x install-activity.py
for file in *.xo; do
- su liveuser -c "./install-activity.py \$file"
+ su olpc -c "./install-activity.py \$file"
rm -f \$file
done
# execute sample content script and clean up afterwards
chmod a+x copy-to-datastore.py
-su liveuser -c ./copy-to-datastore.py
+su olpc -c ./copy-to-datastore.py
rm -f *.pdf
# check modules and themes