summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/mv_install.py
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/mv_install.py')
-rw-r--r--abs/core/LinHES-config/mv_install.py23
1 files changed, 13 insertions, 10 deletions
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index f414942..bf53476 100644
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -82,10 +82,13 @@ def kill_dhcp_chroot():
pass
#force kill
try:
- cmd = "lsof -t /new_boot|xargs kill -9"
+ #cmd = "lsof -t /new_boot|xargs kill -9"
+ #newer versions of lsof show /dev/pts bind mounts
+ #even after they are umounted
+ cmd = "fuser -mk /new_boot"
runcmd(cmd)
except:
- print " !!!Problem killing all /new_boot pids"
+ logging.debug("!!!Problem killing all /new_boot pids")
@@ -218,7 +221,7 @@ def mysqldb(cmd, inchroot):
if cmd == "start":
cmd = "chroot /new_boot /etc/rc.d/mysqld start"
elif cmd == "stop":
- cmd = " chroot /new_boot /etc/rc.d/mysqld stop"
+ cmd = "chroot /new_boot /etc/rc.d/mysqld stop"
else:
if cmd == "start":
cmd = "systemctl start mysqld.service"
@@ -748,10 +751,10 @@ def mount_for_copy_it():
#Versions of util-linux mount after 2.28.2 do not allow 1 image to be
# mounted to multiple loop devices.
#Our ISO mounts airootfs.img to both / and /image_mount
- cmd = 'tar -xvf /tmp/mount2.28.2.tar.xz -C /tmp/'
+ cmd = 'tar -xvf /root/linhes_install/mount2.28.2.tar.xz -C /root/linhes_install/'
rc = runcmd(cmd)[0]
if rc != 0 :
- error_out("Failed to extract static mount from /tmp/mount2.28.2.tar.xz")
+ error_out("Failed to extract static mount from /root/linhes_install/mount2.28.2.tar.xz")
mounts = {}
mounts['/image_mount'] = 'airootfs'
@@ -760,7 +763,7 @@ def mount_for_copy_it():
os.makedirs(image_mount)
except:
pass
- cmd = '/tmp/mount /run/archiso/sfs/%s/%s.img %s' %(fsimage,fsimage,image_mount)
+ cmd = '/root/linhes_install/mount /run/archiso/sfs/%s/%s.img %s' %(fsimage,fsimage,image_mount)
rc = runcmd(cmd)[0]
if rc != 0 :
error_out("Mount image %s" %fsimage)
@@ -770,7 +773,7 @@ def umount_for_copy_it():
mounts = {}
mounts['/image_mount'] = 'airootfs'
for image_mount, fsimage in mounts.iteritems():
- cmd='/tmp/umount %s' %(image_mount)
+ cmd='/root/linhes_install/umount %s' %(image_mount)
rc = runcmd(cmd)[0]
if rc != 0 :
error_out("unMount image %s" %image_mount)
@@ -784,7 +787,7 @@ def copy_it(install_type):
if ( install_type == "install"):
logging.info("Transferring system")
- cmdlist = ['rsync -arp --exclude var-lib-pacman --exclude boot-orig --exclude tmp/mount2.28.2.tar.xz /image_mount/* /new_boot']
+ cmdlist = ['rsync -arp --exclude var-lib-pacman --exclude boot-orig /image_mount/* /new_boot']
for cmd in cmdlist:
rc = runcmd(cmd)[0]
@@ -796,7 +799,7 @@ def copy_it(install_type):
if ( install_type == "upgrade"):
logging.info("Upgrading system")
- cmdlist = ['rsync -arp --exclude var-lib-pacman --exclude boot-orig --exclude tmp/mount2.28.2.tar.xz --exclude /home --exclude /data/srv/mysql /image_mount/* /new_boot']
+ cmdlist = ['rsync -arp --exclude var-lib-pacman --exclude boot-orig --exclude /home --exclude /data/srv/mysql /image_mount/* /new_boot']
for cmd in cmdlist:
rc = runcmd(cmd)[0]
@@ -1653,7 +1656,7 @@ def full_install(hostoptions):
else:
double_mount(fe_only=True)
#move_myth_home("restore")
-# Need to check for to touch /tmp/.dbsysfailed
+ #Need to check for to touch /tmp/.dbsysfailed
#cmd = " chroot %s %s/bin/myth_settings_wrapper.sh -c restore -t syssettings " %(data_config.MOUNTPOINT, MVROOT)
#runcmd(cmd)
if ( 'x' == '1' ):