Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/oob/post.sh
blob: 3b7deef6573e788d629bb72232007e8520fcf1b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

src_root=$(dirname $0)
cd ${INSTALL_ROOT}

creds=$(ls -aldn home/olpc | awk '{print $3 ":" $4}')
gconf_set="gconftool-2 --direct --config-source xml:readwrite:etc/gconf/gconf.xml.defaults --set"

$gconf_set --type float  /desktop/sugar/font/default_size 7
$gconf_set --type bool   /desktop/sugar/show_logout false
$gconf_set --type bool   /desktop/sugar/power/automatic true
$gconf_set --type string /desktop/sugar/user/default_nick 'disabled'
$gconf_set --type bool   /desktop/sugar/network/adhoc true

echo "echo 0 > /sys/class/net/eth0/lbs_mesh" >> etc/rc.local

cat > etc/sweets.conf << EOF
[sweets]
# enable Sugar Network support in Sugar Shell
sugar-network = True

[local-document]
# url to connect to Sugar Network server API
# make it empty to discover local servers via Avahi
api-url =
# start server to share local documents
server-mode = False
EOF

# modules.d/base swipes locale-archive
cp opt/sweets/locales/locale-archive /usr/lib/locale/

# XXX IPTables init.d script is disabled but something starts anyway
# blacklisting doesn't help
find lib -type d -name netfilter -exec rm -rf {} \; || true

mkdir -p home/olpc/{Activities,Library}
for bundle in $(ls $src_root/activities/*.xo); do
    unzip -q $bundle -d home/olpc/Activities/
done
chown ${creds} -R home/olpc/{Activities,Library}

cat > home/olpc/.xsession << EOF
exec sweets-sugar
EOF
chown ${creds} home/olpc/.xsession