*** ds-backup-orig.py	2009-06-01 22:09:23.000000000 +0800
--- ds-backup.py	2009-06-01 21:52:32.000000000 +0800
***************
*** 27,32 ****
--- 27,33 ----
  import glob
  import popen2
  import re
+ import gconf
  
  from sugar import env
  from sugar import profile
***************
*** 86,92 ****
      # Note: the dest dir on the XS is watched via
      # inotify - so we avoid creating tempfiles there.
      tmpfile = tempfile.mkstemp()
!     rsync = ("/usr/bin/rsync -z -rlt --timeout 10 -T /tmp -e '%s' '%s' '%s' "
               % (ssh, tmpfile[1], 'schoolserver:/var/lib/ds-backup/completion/'+user))
      rsync_p = popen2.Popen3(rsync, True)
      rsync_exit = os.WEXITSTATUS(rsync_p.wait())
--- 87,93 ----
      # Note: the dest dir on the XS is watched via
      # inotify - so we avoid creating tempfiles there.
      tmpfile = tempfile.mkstemp()
!     rsync = ("/usr/bin/rsync -a -rlt --timeout 10 -T /tmp -e '%s' '%s' '%s' "
               % (ssh, tmpfile[1], 'schoolserver:/var/lib/ds-backup/completion/'+user))
      rsync_p = popen2.Popen3(rsync, True)
      rsync_exit = os.WEXITSTATUS(rsync_p.wait())
***************
*** 116,122 ****
      if have_ofw_tree():
          sn = read_ofw('mfg-data/SN')
      else:
!         sn = 'SHF00000000'
  
      ds_path = env.get_profile_path('datastore')
      pk_path = os.path.join(env.get_profile_path(), 'owner.key')
--- 117,126 ----
      if have_ofw_tree():
          sn = read_ofw('mfg-data/SN')
      else:
! 	# HAM : SoaS
!         # sn = 'SHF00000000'
! 	client = gconf.client_get_default()
! 	sn = client.get_string('/desktop/sugar/soas_serial')
  
      ds_path = env.get_profile_path('datastore')
      pk_path = os.path.join(env.get_profile_path(), 'owner.key')
