summaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-04-12 22:32:06 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-04-12 22:32:06 +0000
commit1cf95676b7939d5ee99511a85b00748e281336cd (patch)
treefed05b61abe0df5620144affc0f7a6603f96543f /install
parentda93ce92f6368cacf93b2fb0fafa85be5aff1cf9 (diff)
downloadlive-1cf95676b7939d5ee99511a85b00748e281336cd.tar.gz
Configure /etc/vfstab
Diffstat (limited to 'install')
-rwxr-xr-xinstall25
1 files changed, 24 insertions, 1 deletions
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'])