2026-01-13 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdautoback(8) that threw an exception when operating
	with a database version less than 353.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2026-01-13 09:02:33 -05:00
parent 7b646367c1
commit 2f70c4df80
3 changed files with 12 additions and 5 deletions

View File

@@ -25114,3 +25114,6 @@
2026-01-12 Fred Gleason <fredg@paravelsystems.com>
* Fixed bugs in rdautorest(8) That could cause failure if
mountpoints were in a partially connected state.
2026-01-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdautoback(8) that threw an exception when operating
with a database version less than 353.

View File

@@ -30,7 +30,7 @@ import syslog
def UnmountDevice(mntpt):
if(os.system(command='findmnt '+mntpt+' > /dev/null')==0):
os.system(command='umount --quiet '+mntpt)
os.system(command='umount '+mntpt+' > /dev/null')
try:
os.rmdir(mntpt)
except FileNotFoundError:
@@ -88,10 +88,14 @@ def BackupMountpoint(mntpt):
database=rd_config.get('mySQL','Database'),
charset='utf8mb4')
cursor=db.cursor()
cursor.execute('select `REALM_NAME` from `SYSTEM`')
f.write('RealmName='+cursor.fetchone()[0]+'\n')
cursor.execute('select `DB` from `VERSION`')
f.write('DatabaseSchema='+str(cursor.fetchone()[0])+'\n')
db_ver=cursor.fetchone()[0]
f.write('DatabaseSchema='+str(db_ver)+'\n')
if(db_ver>=353):
cursor.execute('select `REALM_NAME` from `SYSTEM`')
f.write('RealmName='+cursor.fetchone()[0]+'\n')
else:
f.write('RealmName=NULL\n')
db.close()
with os.popen('du -h '+mntpt+'/snd',mode='r') as f1:
values=f1.read().split('\t')

View File

@@ -31,7 +31,7 @@ import syslog
def UnmountDevice(mntpt):
if(os.system(command='findmnt '+mntpt+' > /dev/null')==0):
os.system(command='umount --quiet '+mntpt)
os.system(command='umount '+mntpt+' > /dev/null')
try:
os.rmdir(mntpt)
except FileNotFoundError: