Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/oob/post.sh
blob: ac53367b8e13a4733f2a39b9f5505579d98730ad (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash

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

cat > etc/yum.repos.d/SweetsDistribution.repo << EOF
[SweetsDistribution]
name=SweetsDistribution
failovermethod=priority
baseurl=http://download.sugarlabs.org/packages/SweetsDistribution/Fedora-14/
enabled=1
metadata_expire=1
gpgcheck=0

[SweetsDistribution:Factory]
name=SweetsDistribution:Factory
failovermethod=priority
baseurl=http://download.sugarlabs.org/packages/SweetsDistribution:/Factory/Fedora-14/
enabled=1
metadata_expire=1
gpgcheck=0
EOF

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]
# url to connect to Sugar Network server API
# make it empty to discover local servers via Avahi
api-url = http://api-testing.network.sugarlabs.org
# 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 i in $(ls $src_root/activities/*.xo); do HOME=home/olpc sugar-install-bundle $i; done
for i in `find home/olpc/.local -type l`; do ln -fs /$(readlink $i) $i; done

# Index Sugar Network local content to avoid doing that on the first startup
sugar-network-service \
    --local-root=/home/olpc/.sugar/default/network \
    --activity-dirs=/home/olpc/Activities:/usr/share/sugar/activities \
    index $PWD \
    org.laptop.Calculate \
    org.laptop.Chat \
    org.laptop.Pippy \
    org.laptop.TurtleArtActivity \
    org.laptop.WebActivity \
    org.laptop.AbiWordActivity \
    org.vpri.EtoysActivity

cat > home/olpc/.xsession << EOF
exec sweets-sugar
EOF

creds=$(ls -aldn home/olpc | awk '{print $3 ":" $4}')
chown ${creds} -R home/olpc