|
100 |
print '' |
100 |
print '' |
101 |
#print 'eval "$(univention-config-registry shell)"' |
101 |
#print 'eval "$(univention-config-registry shell)"' |
102 |
|
102 |
|
|
|
103 |
# hostname and domain |
103 |
print 'hostname=\"%s\"' % clientObject[0][1].get('cn')[0] |
104 |
print 'hostname=\"%s\"' % clientObject[0][1].get('cn')[0] |
104 |
print 'domainname=\"%s\"' % ucr.get('domainname') |
105 |
print 'domainname=\"%s\"' % ucr.get('domainname') |
105 |
print 'thinclient_flash_server=\"%s.%s\"' % (ucr.get('hostname'), ucr.get('domainname')) |
106 |
|
|
|
107 |
# boot paramter -> use values from pxe/* vars |
108 |
|
109 |
# flash server from ucr var, default fqdn |
110 |
flashServer = ucr.get('pxe/thinclient/flash/server', "") |
111 |
if flashServer: |
112 |
print 'thinclient_flash_server="%s"' % flashServer |
113 |
else: |
114 |
print 'thinclient_flash_server="%s.%s"' % (ucr.get('hostname'), ucr.get('domainname')) |
115 |
|
116 |
# ldap server |
117 |
ldapServer = ucr.get('pxe/ldapserver', "") |
118 |
if ldapServer: |
119 |
print 'ldapserverCmdline="ldapServer=\\"%s\\""' % ldapServer |
120 |
print 'ldapserver="%s"' % ldapServer |
121 |
|
122 |
# ldap port |
123 |
ldapPort = ucr.get('pxe/ldapport', "") |
124 |
if ldapPort: |
125 |
print 'ldapport="ldapPort=%s"' % ldapPort |
126 |
|
127 |
# vga |
128 |
vga = ucr.get('pxe/vga', "") |
129 |
if vga: |
130 |
print 'vga="vga=%s"' % vga |
131 |
|
132 |
# quiet |
133 |
if ucr.get('pxe/quiet', "no").lower() in ['yes', 'true', '1']: |
134 |
print 'quiet="quiet"' |
135 |
|
136 |
# loglevel |
137 |
loglevel = ucr.get('pxe/loglevel', "") |
138 |
if loglevel: |
139 |
print 'loglevel="loglevel=%s"' % loglevel |
140 |
|
141 |
# nameserver |
142 |
print 'nameserverCmdline="DNSSERVER=%s"' % ucr.get('pxe/nameserver') |
143 |
print 'nameserver="%s"' % ucr.get('pxe/nameserver') |
144 |
|
145 |
# ucr policies |
106 |
for k in results.keys(): |
146 |
for k in results.keys(): |
107 |
# 7468696e636c69656e742f666c6173682f ==> thinclient/flash/ |
147 |
# 7468696e636c69656e742f666c6173682f ==> thinclient/flash/ |
108 |
if k.startswith('univentionRegistry;entry-hex-7468696e636c69656e742f666c6173682f'): |
148 |
if k.startswith('univentionRegistry;entry-hex-7468696e636c69656e742f666c6173682f'): |
109 |
print '%s=\'%s\'' % (k.split('univentionRegistry;entry-hex-')[-1].decode('hex').replace('/','_'), results[k][0]) |
149 |
print '%s=\'%s\'' % (k.split('univentionRegistry;entry-hex-')[-1].decode('hex').replace('/','_'), results[k][0]) |
110 |
|
150 |
|
|
|
151 |
# add flash script |
111 |
lines = open('/etc/univention/flash/thin-client-flash-update').readlines() |
152 |
lines = open('/etc/univention/flash/thin-client-flash-update').readlines() |
112 |
for line in lines: |
153 |
for line in lines: |
113 |
print line, |
154 |
print line, |