Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/oob/post.sh
blob: b824eda3586f642060c4a92334299f36518720ec (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
#!/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 =
# 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

# Index Sugar Network local content to avoid doing that on the first startup
sugar-network-service -DD index . olpc auto

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

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