summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-11-14 23:12:12 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-11-14 23:12:12 (GMT)
commit7b556fcdbe7739d97221009e3c291d2ae7c2b4a5 (patch)
treef4a232d10f2ca22fe19321a136a0ca1aa019a356
parente9de2b12b35f77ce67204c6e1964a5345bb15b6c (diff)
downloadlinhes_pkgbuild-7b556fcdbe7739d97221009e3c291d2ae7c2b4a5.zip
linhes_pkgbuild-7b556fcdbe7739d97221009e3c291d2ae7c2b4a5.tar.gz
linhes_pkgbuild-7b556fcdbe7739d97221009e3c291d2ae7c2b4a5.tar.bz2
linhes-config: Systems with memory less then 1GB sometimes will have problems with an install.
The OOM if needed will kill off a process, most of the time unsquashfs. This causes problems later on, when doing work in the chroot. - catch unsquashfs errors - try to mount swap space if present.
-rw-r--r--abs/core/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-config/mv_install.py23
2 files changed, 23 insertions, 4 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index da17287..cc8b151 100644
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=45
+pkgrel=46
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config )
pkgdesc="Install and configure your system"
depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted'
@@ -101,7 +101,7 @@ build() {
install -m 0755 issue $startdir/pkg/etc/issue
}
-md5sums=('6259677916192a92d1adf47b276f7829'
+md5sums=('6c0cbf0207f39a961d78861215109044'
'16b98fcb3753ef6cfc35075c326d30e4'
'e36da536dd651ef182e7642337889e77'
'985891a43f7c4c983eb2a362162f1a0f'
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index cc4e4a6..e251291 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -420,6 +420,9 @@ def mount_it():
# Mount root
cmd = "mount /dev/%s %s" %(hostoptions["rootpartition"], mountpoint)
runcmd(cmd)
+
+
+
#logging.debug(cmd)
#cmdout=commands.getoutput(cmd)
#logging.debug(cmdout)
@@ -457,6 +460,10 @@ def unmount_it():
cmd = "sync"
runcmd(cmd)
+def swapon():
+ logging.info("______starting swap______")
+ cmd = "swapon /dev/%s" %(hostoptions["swappartition"])
+ runcmd(cmd)
def create_squashlist():
logging.debug("Creating squashlist")
@@ -475,7 +482,11 @@ def copy_it(install_type):
if ( install_type == "install"):
logging.info("Transferring system")
cmd = " unsquashfs -f -d %s /.livesys/medium/larch/system.sqf" %(data_config.MOUNTPOINT)
- runcmd(cmd)
+ #runcmd(cmd)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("Running unsquashfs")
+
#logging.debug(cmd)
#cmdout=commands.getoutput(cmd)
@@ -483,7 +494,10 @@ def copy_it(install_type):
logging.info("Upgrading system")
create_squashlist()
cmd = " unsquashfs -e %s -f -d %s /.livesys/medium/larch/system.sqf" %(data_config.SQUASHFILE, data_config.MOUNTPOINT)
- runcmd(cmd)
+ #runcmd(cmd)
+ rc = runcmd(cmd)[0]
+ if rc != 0 :
+ error_out("Running unsquashfs")
#logging.debug(cmd)
#cmdout=commands.getoutput(cmd)
# Create the missing dir
@@ -1015,6 +1029,8 @@ def full_install(hostoptions):
update_status(statusmsg)
progress(3)
mount_it()
+ swapon()
+
# Find number of bytes written to disk before starting copy. This is used
# to have a somewhat decent progress indication.
@@ -1022,6 +1038,8 @@ def full_install(hostoptions):
msg = "Creating %s" %(systemconfig["hostname"])
update_status(msg)
+
+
# Copy system to disk
copy_it("install")
# Remove old fstab so that a new one is created
@@ -1245,6 +1263,7 @@ def upgrade(hostoptions):
update_status(statusmsg)
progress(3)
mount_it()
+ swapon()
hostoptions["backupfile"] = data_config.BACKUPPATH+data_config.BACKUPFILE
statgrab( hostoptions["rootdisk"])
msg = "Upgrading %s" %(systemconfig["hostname"])