From 1cf95676b7939d5ee99511a85b00748e281336cd Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 12 Apr 2013 22:32:06 +0000 Subject: Configure /etc/vfstab --- install | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'install') diff --git a/install b/install index 06d328a..b69b1b8 100755 --- a/install +++ b/install @@ -667,15 +667,38 @@ def in_bootenv(cmd): chroot += cmd return call(chroot, stderr=PIPE, stdout=PIPE) + +def write_vfstab(): + vfstab=''' +#device device mount FS fsck mount mount +#to mount to fsck point type pass at boot options +# +fd - /dev/fd fd - no - +swap - /tmp tmpfs - yes - +/dev/zvol/dsk/{rpool}/swap - - swap - no - +'''.format(rpool=rpool) + try: + f = open(rootdir + '/etc/vfstab', 'w') + print(vfstab, file=f) + f.close() + except: + pass + + def configure_bootenv(): progress = ProgressMessage(screen, title='Configuring Dyson boot environment', width=50) + + write_vfstab() + progress.text = 'Preparing chroot ...' call(['mount', '-F' , 'lofs', '/devices', rootdir + '/devices'], stdout=PIPE, stderr=PIPE) call(['mount', '-F' , 'fd', '-', rootdir + '/dev/fd'], stdout=PIPE, stderr=PIPE) call(['mount', '-F' , 'proc', '-', rootdir + '/proc'], stdout=PIPE, stderr=PIPE) + progress.text = 'Updating devices ...' in_bootenv(['/sbin/devfsadm']) - progress.text = 'Updating boot archive, please wait ...' + + progress.text = 'Creating boot archive, please wait ...' in_bootenv(['/sbin/bootadm', 'update-archive']) -- cgit v1.2.3