diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 545: set hostname in linux based images to device-configs hostname

Message ID 20130129041914.22470.95704.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Andy Doan Jan. 29, 2013, 4:19 a.m. UTC
------------------------------------------------------------
revno: 545
committer: Andy Doan <andy.doan@linaro.org>
branch nick: hostname
timestamp: Mon 2013-01-28 17:57:06 -0600
message:
  set hostname in linux based images to device-configs hostname
  
  this was requested by the cbuild guys to help them build better
  reports based on where the job actually ran.
modified:
  lava_dispatcher/device/target.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/device/target.py'
--- lava_dispatcher/device/target.py	2013-01-23 17:52:50 +0000
+++ lava_dispatcher/device/target.py	2013-01-28 23:57:06 +0000
@@ -154,11 +154,15 @@ 
         self.deployment_data = Target.ubuntu_deployment_data
         with open('%s/root/.bashrc' % rootdir, 'a') as f:
             f.write('export PS1="%s"\n' % self.deployment_data['TESTER_PS1'])
+        with open('%s/etc/hostname' % rootdir, 'w') as f:
+            f.write('%s\n' % self.config.hostname)
 
     def _customize_oe(self, rootdir):
         self.deployment_data = Target.oe_deployment_data
         with open('%s/etc/profile' % rootdir, 'a') as f:
             f.write('export PS1="%s"\n' % self.deployment_data['TESTER_PS1'])
+        with open('%s/etc/hostname' % rootdir, 'w') as f:
+            f.write('%s\n' % self.config.hostname)
 
     def _customize_linux(self, image):
         root_part = self.config.root_part