Ignore:
Timestamp:
Oct 28, 2007, 2:47:50 AM (17 years ago)
Author:
price
Message:

postinst script, nicer pathnames, and read password hash from a file

The postinst script has been tested by running it directly,
but I still haven't attempted actually building and installing
the package.

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  
    77from subprocess import call
    88
    9 def make_debian_cd(basetree, passhash):
    10   old_preseed = file(os.path.join(basetree, 'preseed.cfg'))
     9data_dir = '/srv/guest-installer'
     10
     11def make_debian_cd(name, passhashfile):
     12  basetree = os.path.join(data_dir, name)
    1113  tmptree = tempfile.mkdtemp('', 'auto-install.', '/tmp')
    1214  cdtree = os.path.join(tmptree, 'cdrom')
    1315  shutil.copytree(os.path.join(basetree, 'cdrom'), cdtree, symlinks=True)
    1416  new_preseed = file(os.path.join(cdtree, 'preseed.cfg'), 'w')
     17  old_preseed = file(os.path.join(basetree, 'preseed.cfg'))
    1518  new_preseed.write(old_preseed.read())
     19  passhash = file(passhashfile).read()
    1620  new_preseed.write('d-i passwd/root-password-crypted password '+passhash+'\n')
    1721  new_preseed.close()
Note: See TracChangeset for help on using the changeset viewer.