- if xsc.read('', '%s/device-type' % dev) == 'cdrom':
- data['cdrom'] = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
+ dev_type = xsc.read('', '%s/device-type' % dev)
+ dev_params = xsc.read('', '%s/params' % xsc.read('', '%s/backend' % dev))
+ if dev_type == 'cdrom':
+ data['cdrom'] = dev_params
+ elif dev_type == 'disk' and dev_params == '/dev/xenvg/s_install_hda':
+ data['autoinstall'] = True