summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-06-29 16:28:57 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-06-29 16:28:57 (GMT)
commit649b5da147f6d2107142c596c915f23b06f9bea1 (patch)
treee0d9ecc742a0dc4791ba8189031656d0a29030f0
parent7b8ad87e6071e6aada4f190b7b6cb7b77baef742 (diff)
downloadlinhes_pkgbuild-649b5da147f6d2107142c596c915f23b06f9bea1.zip
linhes_pkgbuild-649b5da147f6d2107142c596c915f23b06f9bea1.tar.gz
linhes_pkgbuild-649b5da147f6d2107142c596c915f23b06f9bea1.tar.bz2
linhes-config: set first parition to active on new installs.
-rwxr-xr-xabs/core-testing/LinHES-config/PKGBUILD2
-rwxr-xr-xabs/core-testing/LinHES-config/mv_install.py14
2 files changed, 15 insertions, 1 deletions
diff --git a/abs/core-testing/LinHES-config/PKGBUILD b/abs/core-testing/LinHES-config/PKGBUILD
index 8a17408..984926b 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=29
+pkgrel=31
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 9d70a55..e96dd56 100755
--- a/abs/core-testing/LinHES-config/mv_install.py
+++ b/abs/core-testing/LinHES-config/mv_install.py
@@ -307,6 +307,19 @@ def create_partitions(diskdevice, size, ptype, startsector):
(newpart.getDeviceNodeName(), newpart.getSize(), diskdevice))
return newpart.getDeviceNodeName()
+def set_active_parition(diskdevice):
+ """ Set the bootable flag for this partition. """
+ logging.debug(" Setting active parition")
+ device = parted.getDevice(diskdevice)
+ partdisk = parted.Disk(device)
+ try:
+ for partition in partdisk.partitions:
+ partition.setFlag(parted.PARTITION_BOOT)
+ partdisk.commit()
+ except:
+ logging.info(" Couldn't set the active partition")
+ logging.info(" Depending on your system this may not matter")
+
def partition_disk():
global hostoptions
@@ -319,6 +332,7 @@ def partition_disk():
label = "data"
partitions_removeall("/dev/"+datadisk, label)
hostoptions["rootpartition"] = create_partitions("/dev/"+rootdisk, hostoptions["rootsize"], "NORMAL", 0)
+ set_active_parition("/dev/"+rootdisk)
hostoptions["swappartition"] = create_partitions("/dev/"+rootdisk, hostoptions["swapsize"], "SWAP", 1)
if datadisk != rootdisk:
hostoptions["datapartition"] = create_partitions("/dev/"+datadisk, hostoptions["datasize"], "NORMAL", 0)