Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/oob/post.sh
blob: bba2eeee24833b57bad8f833e6494b6fea35465f (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
76
77
78
79
80
#!/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
$gconf_set --type string /desktop/sugar/collaboration/jabber_server ''

echo "echo 0 > /sys/class/net/eth0/lbs_mesh" >> etc/rc.local
echo "18.85.44.120 api-testing.network.sugarlabs.org" >> etc/hosts

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

[client]
# optional command-line arguments to pass to packager while unattended updating
# the system
update-args = --disablerepo=* --enablerepo=SweetsDistribution --enablerepo=SweetsDistribution:Factory
# if more than 0, do regular unattended updates with specified delay in seconds
update-timeout = 86400
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 -o -q $bundle -d home/olpc/Activities/
done

# Index Sugar Network local content to avoid doing that on the first startup
sugar-network-service --activity-dirs=/home/olpc/Activities --local-root=/home/olpc/.sugar/default/network -DD index $PWD auto

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

cat > home/olpc/.i18n << EOF
LANG="es_PE.utf8"
LANGUAGE="es_PE.utf8"
EOF

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