
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 0.58 KB | hits: 18 | expires: Never
#!/usr/bin/env ruby
require '/usr/local/cft/contextclient/lib/utils/c3_utils.rb'
# get the user-data from the etc/cloudinit.d/code/user-data
# this is magic behavior which should be formalized
# cat it into the environment
#testing this in firstboot env only - why did I not have it there?
# can't use for now because gets deleted every client run - blechhh!. /etc/cloudinit.d/params.txt
my_properties = C3Utils.load_properties("/usr/local/cft/contextclient/manager-data")
system("bin/hostname #{my_properties['hostname']}")
# end of test - might need on re-boot, can't image why...