diff options
author | James Meyer <james.meyer@operamail.com> | 2012-09-02 01:09:05 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-09-02 01:09:05 (GMT) |
commit | f4ccda270690f36a506a5d7d9ce0c042688f8493 (patch) | |
tree | dd613e35c47ca2e9bce660456c7394c0859bace1 /abs/core/LinHES-system/add_storage.py | |
parent | e98d93babfa1fc1d248e2433e566329fe5a92ff0 (diff) | |
download | linhes_pkgbuild-f4ccda270690f36a506a5d7d9ce0c042688f8493.zip linhes_pkgbuild-f4ccda270690f36a506a5d7d9ce0c042688f8493.tar.gz linhes_pkgbuild-f4ccda270690f36a506a5d7d9ce0c042688f8493.tar.bz2 |
LinHES-system: changed dir layout to the new proposed layout of /data/storage/disk0{media|systembackups}
Diffstat (limited to 'abs/core/LinHES-system/add_storage.py')
-rw-r--r-- | abs/core/LinHES-system/add_storage.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/abs/core/LinHES-system/add_storage.py b/abs/core/LinHES-system/add_storage.py index 3f02acd..6afe7c3 100644 --- a/abs/core/LinHES-system/add_storage.py +++ b/abs/core/LinHES-system/add_storage.py @@ -20,9 +20,9 @@ storage_dir = "/etc/storage.d" pickle_file = "%s/storage.pkl" %storage_dir -SG_MAP_BE={ 'Default' :'tv', +SG_MAP_BE={ 'Default' :'media/tv', 'LiveTV' :'media/tv/live', -'DB Backups' :'system_backups/mythtv_db/'} +'DB Backups' :'system_backups/mythtv_backups/'} SG_MAP_FE={ @@ -48,7 +48,7 @@ class disk_device: device_obj = bus.get_object("org.freedesktop.UDisks", device) device_props = dbus.Interface(device_obj, dbus.PROPERTIES_IFACE) self.storage_dir = storage_dir - self.top_mount_dir = "/storage" + self.top_mount_dir = "/data/storage" self.config = ConfigParser.RawConfigParser() self.fs_map = self.get_fsmap() self.is_device = self.get_is_device(device_props) @@ -173,8 +173,8 @@ class disk_device: return fs_map def find_fstype(self,moutpoint): - fstype="ext3" - mp=['/myth', '/data/media'] + fstype="xfs" + mp=['/myth', '/data/storage/disk0/media'] for i in self.fs_map: if i[1] in mp: fstype = i[2] @@ -214,7 +214,7 @@ class disk_device: return fstab def find_options_type(self,fstab): - mp=['/myth', '/data/media'] + mp=['/myth', '/data/storage/disk0/media'] for i in fstab: split_line=i.split() try: @@ -238,7 +238,7 @@ class disk_device: self.new_mount_point="%s/%s_%s" %(self.top_mount_dir,self.model.replace(' ',''),self.serial_number.replace(' ','')) if bind: - new_fstab_list=["/myth" , self.new_mount_point , "none" , "rw,bind", '0', '0'] + new_fstab_list=["/data/storage/disk0" , self.new_mount_point , "none" , "rw,bind", '0', '0'] else: #determine options @@ -344,10 +344,13 @@ class disk_device: return def symlink(self): + pass print " Creating symlink" - cmd = "ln -s %s %s/myth " %(self.new_mount_point, self.top_mount_dir) - runcmd(cmd) - cmd = "ln -s %s %s/data " %(self.new_mount_point, self.top_mount_dir) + #cmd = "ln -s %s %s/myth " %(self.new_mount_point, self.top_mount_dir) + #runcmd(cmd) + #cmd = "ln -s %s %s/disk0 " %(self.new_mount_point, self.top_mount_dir) + #runcmd(cmd) + cmd = "ln -s %s/media /myth " %(self.new_mount_point) runcmd(cmd) |