Changeset 218 for trunk/packages/sipb-xen-guest-installer
- Timestamp:
- Oct 28, 2007, 1:08:34 AM (17 years ago)
- Location:
- trunk/packages/sipb-xen-guest-installer/sipb-xen-guest-installer
- Files:
-
- 5 added
- 1 deleted
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-guest-installer/sipb-xen-guest-installer/files/srv/guest-installer/etch/preseed.cfg
r215 r218 9 9 10 10 #d-i netcfg/dhcp_timeout string 1 11 12 d-i netcfg/use_dhcp boolean false 13 # If you prefer to configure the network manually, uncomment this line and 14 # the static network configuration below. 15 d-i netcfg/disable_dhcp boolean true 16 17 # Static network configuration. 18 d-i netcfg/get_nameservers string 18.72.0.3 19 # at bottom #d-i netcfg/get_ipaddress string fillme 20 d-i netcfg/get_netmask string 255.255.0.0 21 d-i netcfg/get_gateway string 18.181.0.1 22 d-i netcfg/confirm_static boolean true 11 d-i netcfg/use_dhcp boolean true 23 12 24 13 # Any hostname and domain names assigned from dhcp take precedence over … … 233 222 234 223 # sipb-xen: automatically filled-in values get appended here. 235 # at bottom #d-i netcfg/get_ipaddress string fillme236 # at bottom #d-i netcfg/get_hostname string fillme237 224 # at bottom #d-i passwd/root-password-crypted password [MD5 hash] -
trunk/packages/sipb-xen-guest-installer/sipb-xen-guest-installer/files/usr/sbin/sipb-xen-make-iso
r215 r218 3 3 import sys 4 4 import os 5 import shutil 6 import tempfile 5 7 from subprocess import call 6 8 7 def make_debian_cd(basetree, guest_ip, guest_hostname, passhash, output_iso):9 def make_debian_cd(basetree, passhash): 8 10 old_preseed = file(os.path.join(basetree, 'preseed.cfg')) 9 cdtree = os.path.join(basetree, 'cdrom') 11 tmptree = tempfile.mkdtemp('', 'auto-install.', '/tmp') 12 cdtree = os.path.join(tmptree, 'cdrom') 13 shutil.copytree(os.path.join(basetree, 'cdrom'), cdtree, symlinks=True) 10 14 new_preseed = file(os.path.join(cdtree, 'preseed.cfg'), 'w') 11 15 new_preseed.write(old_preseed.read()) 12 new_preseed.write('d-i netcfg/get_ipaddress string '+guest_ip+'\n')13 new_preseed.write('d-i netcfg/get_hostname string '+guest_hostname+'\n')14 16 new_preseed.write('d-i passwd/root-password-crypted password '+passhash+'\n') 15 17 new_preseed.close() 18 output_iso = os.path.join(tmptree, 'install.iso') 16 19 call('''mkisofs -r -V "SIPB-Xen_Custom_Install_CD" -cache-inodes -J -l 17 20 -b isolinux/isolinux.bin -c isolinux/boot.cat 18 21 -no-emul-boot -boot-load-size 4 -boot-info-table'''.split() 19 22 + ['-o', output_iso, cdtree]) 23 return output_iso 20 24 21 25 if __name__ == '__main__': 22 make_debian_cd(*sys.argv[1:])26 print make_debian_cd(*sys.argv[1:])
Note: See TracChangeset
for help on using the changeset viewer.