summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xabs/core/LinHES-config/mv_install.py118
1 files changed, 35 insertions, 83 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index dab576d..70f6604 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -523,94 +523,43 @@ def create_squashlist():
f.close()
def mount_for_copy_it():
+ mounts = {}
+
+ mounts['/image_mount/root'] = 'root-image'
+ mounts['/image_mount/usr/share'] = 'usr-share'
+ mounts['/image_mount/lib/modules'] = 'lib-modules'
+ mounts['/image_mount/var/lib/pacman'] = 'var-lib-pacman'
+ mounts['/image_mount/data/storage/disk0/pacman/pkg'] = 'data-storage-disk0-pacman-pkg'
+ #mounts['/image_mount/var/cache/pacman'] = 'var-cache-pacman'
+ for image_mount, fsimage in mounts.iteritems():
+ try:
+ os.makedirs(image_mount)
+ except:
+ pass
+ cmd = 'mount /run/archiso/sfs/%s/%s.fs %s' %(fsimage,fsimage,image_mount)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("Mount image %s" %fsimage)
- image_mount='/image_mount/root'
- try:
- os.makedirs(image_mount)
- except:
- pass
- image_mount='/image_mount/root'
-
- image_mount='/image_mount/usr/share'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/lib/modules'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/var/cache/pacman'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- image_mount='/image_mount/var/lib/pacman'
- try:
- os.makedirs(image_mount)
- except:
- pass
-
- fsimage='root-image'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/root' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image root")
-
- fsimage='lib-modules'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/lib/modules' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image lib-modules")
-
- fsimage='usr-share'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/usr/share' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image usr share")
-
- fsimage='var-lib-pacman'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/var/lib/pacman' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image var-lib-pacman")
- fsimage='var-cache-pacman'
- cmd = 'mount /run/archiso/sfs/%s/%s.fs /image_mount/var/cache/pacman' %(fsimage,fsimage)
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("Mount image var-cahce-pacman")
def umount_for_copy_it():
- cmd='umount %s' %('/image_mount/lib/modules')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image lib_modules")
-
- cmd='umount %s' %('/image_mount/usr/share')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image usr_share")
-
- cmd='umount %s' %('/image_mount/root')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image /")
-
- cmd='umount %s' %('/image_mount/var/cache/pacman')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image var-cache-pacman")
+ mounts = {}
+
+ mounts['/image_mount/root'] = 'root-image'
+ mounts['/image_mount/usr/share'] = 'usr-share'
+ mounts['/image_mount/lib/modules'] = 'lib-modules'
+ mounts['/image_mount/var/lib/pacman'] = 'var-lib-pacman'
+ mounts['/image_mount/data/storage/disk0/pacman/pkg'] = 'data-storage-disk0-pacman-pkg'
+ #mounts['/image_mount/var/cache/pacman'] = 'var-cache-pacman'
+ for image_mount, fsimage in mounts.iteritems():
+ cmd = 'mount /run/archiso/sfs/%s/%s.fs %s' %(fsimage,fsimage,image_mount)
+ cmd='umount %s' %(image_mount)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("unMount image %s" %image_mount)
- cmd='umount %s' %('/image_mount/var/lib/pacman')
- rc = runcmd(cmd)[0]
- if rc != 0 :
- error_out("unMount image var-lib-pacman")
@@ -623,7 +572,9 @@ def copy_it(install_type):
cmdlist = ['rsync -arp /image_mount/root/* /new_boot',
'rsync -arp /image_mount/lib/* /new_boot/lib/',
'rsync -arp /image_mount/usr /new_boot',
- 'rsync -arp /image_mount/var /new_boot']
+ 'rsync -arp /image_mount/var /new_boot',
+ 'rsync -arp /image_mount/data/storage/disk0/* /new_boot/data/storage/disk0/'
+ ]
for cmd in cmdlist:
rc = runcmd(cmd)[0]
@@ -678,6 +629,7 @@ def copy_it(install_type):
runcmd(cmd)
cmd = "chmod +s %s/bin/mount" %(data_config.MOUNTPOINT)
runcmd(cmd)
+ #sys.exit(3)
apply_pristine()
post_process()