summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2011-12-30 23:27:56 (GMT)
committerJames Meyer <james.meyer@operamail.com>2011-12-30 23:27:56 (GMT)
commit4f9b3e4a64a5de88017d0b71af15d609c3781490 (patch)
treeacb42c42106b67abb4f927a2da725e6dca50910a /abs/core/LinHES-config
parent3b20f86a8dd042de6271c30ad8a2a2fed773b9c9 (diff)
downloadlinhes_pkgbuild-4f9b3e4a64a5de88017d0b71af15d609c3781490.zip
linhes_pkgbuild-4f9b3e4a64a5de88017d0b71af15d609c3781490.tar.gz
linhes_pkgbuild-4f9b3e4a64a5de88017d0b71af15d609c3781490.tar.bz2
Linhes-config: for install. Only add "acl" to ext3 and ext4. JFS,XFS,resierfs support acl but do not need the mount option
Diffstat (limited to 'abs/core/LinHES-config')
-rw-r--r--abs/core/LinHES-config/PKGBUILD4
-rwxr-xr-xabs/core/LinHES-config/mv_install.py39
2 files changed, 39 insertions, 4 deletions
diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD
index 29201ca..769e992 100644
--- a/abs/core/LinHES-config/PKGBUILD
+++ b/abs/core/LinHES-config/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=LinHES-config
pkgver=2.3
-pkgrel=56
+pkgrel=57
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=('f6bca2af75ddb0902f0fa9ff4b6e4fd7'
+md5sums=('64fad755c12f8eb12940e216e403354e'
'16b98fcb3753ef6cfc35075c326d30e4'
'e36da536dd651ef182e7642337889e77'
'985891a43f7c4c983eb2a362162f1a0f'
diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py
index 85220cf..9763522 100755
--- a/abs/core/LinHES-config/mv_install.py
+++ b/abs/core/LinHES-config/mv_install.py
@@ -555,9 +555,9 @@ def create_fstab(extralines):
fstab_list.append(line)
line = '''/dev/sr0 /media/cdrom auto ro,user,noauto,unhide 0 0\n'''
fstab_list.append(line)
- line = '''UUID=ROOTUID / auto defaults,noatime,acl 0 1\n'''
+ line = '''UUID=ROOTUID / auto defaults,noatime 0 1\n'''
fstab_list.append(line)
- line = '''UUID=DATAUID %s auto defaults,noatime,acl 0 1\n''' %(data_config.DATAMOUNT)
+ line = '''UUID=DATAUID %s auto defaults,noatime 0 1\n''' %(data_config.DATAMOUNT)
fstab_list.append(line)
line = '''UUID=SWAPUID swap swap defaults 0 0 \n'''
fstab_list.append(line)
@@ -577,6 +577,34 @@ def find_uuid(partition):
logging.info("The uuid is %s", uuid)
return uuid.strip()
+def acl_options(partition):
+ logging.info("Finding mount options for %s...", partition)
+ acl_fs_list=["ext3","ext4"]
+ options = "defaults,noatime"
+ cmd = "/sbin/fsck -N /dev/%s" %partition
+
+ cmdoutput = runcmd(cmd)[1]
+ output = cmdoutput.split("\n")
+ fs_map=[]
+ for i in output:
+ if i.startswith("["):
+ split_line=i.split()
+ #find mount_p and remove the last char
+ mount_p = split_line[3][:-1]
+ fstype = split_line[4].split(".")[1]
+ append_tuple=(mount_p,fstype)
+ fs_map.append(append_tuple)
+
+ rc = False
+ print fs_map
+ for i in fs_map:
+ if i[0] == "/dev/%s" %partition:
+ if i[1] in acl_fs_list:
+ rc=True
+ logging.info("Will add acl to the list of options: %s ", rc )
+ return rc
+
+
def pick_out_vg():
logging.info("Searching for Volume Groups in old fstab")
vglines = []
@@ -619,9 +647,11 @@ def fstab_it(install_type):
logging.info("____UUID check for %s", "data")
datauuid = find_uuid(hostoptions["datapartition"])
+ datacl = acl_options(hostoptions["datapartition"])
logging.info("____UUID check for %s", "root")
rootuuid = find_uuid(hostoptions["rootpartition"])
+ rootacl = acl_options(hostoptions["rootpartition"])
fstabfile = data_config.MOUNTPOINT+"/etc/fstab"
logging.info("Correcting UUID's in %s", fstabfile)
@@ -636,6 +666,9 @@ def fstab_it(install_type):
logging.debug(" Found Root fstab line:")
logging.debug( templine)
templine[0] = "UUID=%s" %(rootuuid)
+ if rootacl:
+ templine[3] = templine[3]+",acl"
+
newline = ''
for i in templine:
newline+=i
@@ -649,6 +682,8 @@ def fstab_it(install_type):
logging.debug(" Found DATA mount")
logging.debug( templine)
templine[0] = "UUID=%s" %(datauuid)
+ if datacl:
+ templine[3] = templine[3]+",acl"
newline = ''
for i in templine:
newline+=i