Changeset 221 for trunk/packages/sipb-xen-guest-installer/sipb-xen-guest-installer/files/usr/sbin/sipb-xen-make-iso
- Timestamp:
- Oct 28, 2007, 2:47:50 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-guest-installer/sipb-xen-guest-installer/files/usr/sbin/sipb-xen-make-iso
r218 r221 7 7 from subprocess import call 8 8 9 def make_debian_cd(basetree, passhash): 10 old_preseed = file(os.path.join(basetree, 'preseed.cfg')) 9 data_dir = '/srv/guest-installer' 10 11 def make_debian_cd(name, passhashfile): 12 basetree = os.path.join(data_dir, name) 11 13 tmptree = tempfile.mkdtemp('', 'auto-install.', '/tmp') 12 14 cdtree = os.path.join(tmptree, 'cdrom') 13 15 shutil.copytree(os.path.join(basetree, 'cdrom'), cdtree, symlinks=True) 14 16 new_preseed = file(os.path.join(cdtree, 'preseed.cfg'), 'w') 17 old_preseed = file(os.path.join(basetree, 'preseed.cfg')) 15 18 new_preseed.write(old_preseed.read()) 19 passhash = file(passhashfile).read() 16 20 new_preseed.write('d-i passwd/root-password-crypted password '+passhash+'\n') 17 21 new_preseed.close()
Note: See TracChangeset
for help on using the changeset viewer.