[meego-commits] 7341: Changes to Trunk:Testing/firstboot

Vivian Zhang no_reply at build.meego.com
Mon Sep 6 08:06:34 UTC 2010


Hi,
I have made the following changes to firstboot in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Vivian Zhang

[This message was auto-generated]

---

Request #7341:

  submit:   home:vivian:branches:Trunk:Testing/firstboot(r2)(cleanup) -> Trunk:Testing/firstboot


Message:
    Add exception for btname update, fixed BMC #6305

State:   new          2010-09-06T01:06:33 vivian
Comment: None



changes files:
--------------
--- firstboot.changes
+++ firstboot.changes
@@ -0,0 +1,3 @@
+* Mon Sep 06 2010 Vivian Zhang <vivian.zhang at intel.com> - 1.1
+- Add exception for btname update, fixed BMC #6305
+

new:
----
  fix-6305-add-exception-for-btname-update.patch

spec files:
-----------
--- firstboot.spec
+++ firstboot.spec
@@ -6,6 +6,7 @@
 Version: 1.1
 Release: 1
 Source0: %{name}-%{version}.tar.bz2
+Patch0:  fix-6305-add-exception-for-btname-update.patch
 License: GPLv2+
 Group: System/Base
 ExclusiveOS: Linux
@@ -26,6 +27,7 @@
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 

other changes:
--------------

++++++ fix-6305-add-exception-for-btname-update.patch (new)
--- fix-6305-add-exception-for-btname-update.patch
+++ fix-6305-add-exception-for-btname-update.patch
+diff -Nur firstboot-1.1/modules/create_user.py firstboot-1.1-new/modules/create_user.py
+--- firstboot-1.1/modules/create_user.py	2010-08-27 03:36:53.000000000 -0400
++++ firstboot-1.1-new/modules/create_user.py	2010-09-06 02:21:34.313228525 -0400
+@@ -429,12 +429,15 @@
+ 
+             # set btname
+             if btname:
+-                import dbus
+-                bus = dbus.SystemBus()
+-                manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
+-                adapter = dbus.Interface(bus.get_object("org.bluez", manager.DefaultAdapter()),
+-                                                    "org.bluez.Adapter")
+-                adapter.SetProperty("Name", btname)  
++                try:
++                    import dbus
++                    bus = dbus.SystemBus()
++                    manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
++                    adapter = dbus.Interface(bus.get_object("org.bluez", manager.DefaultAdapter()),
++                                                            "org.bluez.Adapter")
++                    adapter.SetProperty("Name", btname)
++                except:
++                    log.error("Error setting btname")  
+ 
+             # set hostname
+             if os.path.exists("/bin/hostname") and self.hostname:




More information about the MeeGo-commits mailing list