summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2025-11-12 04:19:43 (GMT)
committerBritney Fransen <brfransen@gmail.com>2025-11-12 04:19:43 (GMT)
commite875d03567c7e2cacf201f855b28fc94d08dcdb3 (patch)
tree4473eb93d66499173548fee1e9a880c615dca48c
parente8759985ae97729b9ac4b11af1acf8bf94e87559 (diff)
downloadlinhes_pkgbuild-e875d03567c7e2cacf201f855b28fc94d08dcdb3.zip
linhes_pkgbuild-e875d03567c7e2cacf201f855b28fc94d08dcdb3.tar.gz
linhes_pkgbuild-e875d03567c7e2cacf201f855b28fc94d08dcdb3.tar.bz2
linhes-system: add_storage.py: add filesystem option and fix some partitions being detected as a disk
empty_storage_groups.py: add loop to wait and resume moving files
-rwxr-xr-xlinhes/linhes-system/PKGBUILD6
-rwxr-xr-xlinhes/linhes-system/add_storage.py19
-rwxr-xr-xlinhes/linhes-system/empty_storage_groups.py19
3 files changed, 33 insertions, 11 deletions
diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD
index 5df6abd..95fa5aa 100755
--- a/linhes/linhes-system/PKGBUILD
+++ b/linhes/linhes-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=linhes-system
pkgver=9.0.0
-pkgrel=97
+pkgrel=98
arch=('x86_64')
#install=$pkgname.install
pkgdesc="Everything that makes LinHES a system"
@@ -27,9 +27,9 @@ source=($binfiles
'10-monitor.conf' '81-wol.rules' 'x11vnc.override.conf' 'lh_lighttpd.conf' 'lh_php.ini'
'system-sudo.rules' 'linhes-profile.sh' 'lh_sqlserver.cnf' 'lh_restart_needed.hook'
'lh_system_start.sh.desktop' 'rc6_mce.toml' 'recordings.cron' 'rsyslog.mythtv.conf')
-sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0'
+sha256sums=('1fb11c7f472df9e3066866301962c2678b80c2fbd988dc34db022d51e1101a42'
'8ae6de3d0ff8e777aeea56f74f38676080142148ac3a32f828462d85c39e7cf7'
- 'bf72f364dfd6a694774ae0c998a737bf551057a2b3b427f58418854d3e9c785b'
+ '3f67269c30e8f86169fcde49a8e57e0ce9388fb1c963e2bdf1dad20be4bc041f'
'ff261f41efec8a9963f9f59100cbe75f015028a2ed3a863ce0cb473f2ebb7b76'
'8b54c31b8efde3917f603c5307bebb0a2a00239ad9a983c2f5d8120003256449'
'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27'
diff --git a/linhes/linhes-system/add_storage.py b/linhes/linhes-system/add_storage.py
index cc6feb5..318e77b 100755
--- a/linhes/linhes-system/add_storage.py
+++ b/linhes/linhes-system/add_storage.py
@@ -5,7 +5,7 @@
#Disks that are mounted, in fstab, size < 5000 bytes, optical or
#have already been seen will not be presented as an option.
#
-# Version 2.0.2
+# Version 2.1.0
import dbus
import pickle
@@ -147,7 +147,8 @@ class disk_device:
return True
def get_is_device(self):
- match = re.search(r'part\d+$', self.device_file_path)
+ #match = re.search(r'part\d+$', self.device_file_path)
+ match = re.search(r'part\d+$', self.device_id)
if match is None:
return True
else:
@@ -214,6 +215,20 @@ class disk_device:
if i[1] in mp:
fstype = i[2]
break
+
+ loop = True
+ prompt = '''
+ Format disk with what filesystem (xfs/ext4)?:'''
+
+ while loop:
+ str1 = input(prompt)
+
+ if str1 in ['xfs','ext4']:
+ loop = False
+ fstype=str1
+ break
+ print("\n")
+
return fstype
def lookup_format(self):
diff --git a/linhes/linhes-system/empty_storage_groups.py b/linhes/linhes-system/empty_storage_groups.py
index c181242..1fc4208 100755
--- a/linhes/linhes-system/empty_storage_groups.py
+++ b/linhes/linhes-system/empty_storage_groups.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-import argparse, glob, operator, os, random, shutil, subprocess, sys, signal
+import argparse, glob, operator, os, random, shutil, subprocess, sys, signal, time
shouldQuit = False
def getFreeSpaceForDir(dir):
@@ -163,11 +163,18 @@ if __name__ == '__main__':
print("Check Only option was used. No files were moved.")
shouldQuit = True
else:
- print("------------------------------------------------")
- print("Checking System Status...")
- if subprocess.call(["/usr/bin/python", "/usr/bin/idle.py", "-s"]):
- print(" System is busy. The file will not be moved.")
- sys.exit()
+ isBusy = True
+ while isBusy:
+ if shouldQuit:
+ sys.exit(0)
+ print("------------------------------------------------")
+ print("Checking System Status...")
+ if subprocess.call(["/usr/bin/python", "/usr/bin/idle.py", "-s"]):
+ print(" System is busy. The file will not be moved.")
+ print(" Waiting 5 minutes before trying again.")
+ time.sleep(300)
+ else:
+ isBusy = False
print("Moving File...")
try:
shutil.move(filePathToMove, leastFull[0])