self.settings.add_string_setting(['root-password'],
'set root password',
metavar='PASSWORD')
+ self.settings.add_string_setting(['customize'],
+ 'run SCRIPT after setting up system',
+ metavar='SCRIPT')
def process_args(self, args):
if not self.settings['image']:
self.remove_udev_persistent_rules(rootdir)
self.setup_networking(rootdir)
self.install_extlinux(rootdev, rootdir)
+ self.customize(rootdir)
except:
self.cleanup()
raise
for dirname in self.remove_dirs:
shutil.rmtree(dirname)
+ def customize(self, rootdir):
+ script = self.settings['customize']
+ if script:
+ self.message('Running customize script %s' % script)
+ self.runcmd([script, rootdir])
+
if __name__ == '__main__':
VmDebootstrap().run()
.BR \-\-root\-password =\fIPASSWORD
Set password for root.
The default is to disable root's password.
+.TP
+.BR \-\-customize =\fISCRIPT
+Run
+.I SCRIPT
+(typically, but not necessarily, a shell script)
+after setting up the new system image.
+The script will get a single parameters:
+the path to the root directory of the newly installed system.
.SH EXAMPLE
To create an image for the stable release of Debian:
.nf