Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAjay Garg <ajay@activitycentral.com>2012-10-19 07:20:26 (GMT)
committer Ajay Garg <ajay@activitycentral.com>2012-10-19 07:24:44 (GMT)
commitfef6953ecc6f30702e44ae253003d2b8d3c45905 (patch)
tree9cffb97046c6c2921fa854d5f268b648e2082b66
parenta2465ecad0aa27a71ab22ca2c5e7dcb08de9784d (diff)
Gnome-Keyring
Signed-off-by: Ajay Garg <ajay@activitycentral.com>
-rw-r--r--bin/sugar.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/bin/sugar.in b/bin/sugar.in
index d9a41ba..c889d6a 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -73,6 +73,27 @@ export LANGUAGE="${LANGUAGE:-${LANG}}"
# Set Sugar's telepathy accounts directory
export MC_ACCOUNT_DIR=$HOME/.sugar/$SUGAR_PROFILE/accounts
+# Check if the keyring exists and create a default
+# unencrypted keyring (OLPC #10290)
+keyring_path=$HOME/.gnome2/keyrings
+if [ ! -e $keyring_path/login.keyring ] &&
+ [ ! -e $keyring_path/default.keyring ]; then
+ mkdir -p $keyring_path
+ echo 'default' > $keyring_path/default
+ TIME=$(/bin/date +%s)
+ cat >> $keyring_path/default.keyring.tmp <<EOF
+[keyring]
+display-name=default
+ctime=$TIME
+mtime=$TIME
+lock-on-idle=false
+lock-timeout=0
+EOF
+
+mv $keyring_path/default.keyring{.tmp,}
+fi
+
+
# Source language settings and debug definitions
if [ -f ~/.i18n ]; then
. ~/.i18n