summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/LinHES-config
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/LinHES-config')
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/mv_install.py31
2 files changed, 25 insertions, 8 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 676c13f..cc67e21 100755
--- a/abs/core-testing/LinHES-config/PKGBUILD
+++ b/abs/core-testing/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.0
-pkgrel=25
+pkgrel=26
conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev )
pkgdesc="Install and configure your system"
depends=(bc libstatgrab mysql-python expect curl dnsutils parted sg3_utils nmbscan system-templates rsync python-parted ddcxinfo)
diff --git a/abs/core-testing/LinHES-config/mv_install.py b/abs/core-testing/LinHES-config/mv_install.py
index 87fbaae..9d70a55 100755
--- a/abs/core-testing/LinHES-config/mv_install.py
+++ b/abs/core-testing/LinHES-config/mv_install.py
@@ -219,16 +219,33 @@ def umount_bind_chroot():
runcmd(cmd)
+def blank_table(diskdevice):
+ logging.debug(" writing new parition table for %s", diskdevice)
+ logging.debug("parition table before:")
+ cmd = "fdisk -l %s" %diskdevice
+ runcmd(cmd)
+
+ cmd = "echo w |fdisk %s" %diskdevice
+ runcmd(cmd)
+
+ logging.debug("parition table after:")
+ cmd = "fdisk -l %s" %diskdevice
+ runcmd(cmd)
+
def partitions_removeall(diskdevice, label):
logging.info("Removing all partitions for %s %s", label, diskdevice)
- device = parted.getDevice(diskdevice)
- partdisk = parted.Disk(device)
- partdisk.deleteAllPartitions()
- if data_config.NOOPDEBUG == "FALSE":
- partdisk.commit()
+ try:
+ device = parted.getDevice(diskdevice)
+ partdisk = parted.Disk(device)
+ partdisk.deleteAllPartitions()
+ if data_config.NOOPDEBUG == "FALSE":
+ partdisk.commit()
+ for partition in partdisk.partitions:
+ print "type: %s" %partition.type
+ except:
+ logging.debug(" Error reading parition table, attempting to write a blank one")
+ blank_table(diskdevice)
- for partition in partdisk.partitions:
- print "type: %s" %partition.type
def create_partitions(diskdevice, size, ptype, startsector):
logging.debug("_____Create partitions______")