diff --git a/ChangeLog b/ChangeLog index 138da5dc..bd149368 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25114,3 +25114,6 @@ 2026-01-12 Fred Gleason * Fixed bugs in rdautorest(8) That could cause failure if mountpoints were in a partially connected state. +2026-01-13 Fred Gleason + * Fixed a bug in rdautoback(8) that threw an exception when operating + with a database version less than 353. diff --git a/utils/rdautoback/rdautoback.py b/utils/rdautoback/rdautoback.py index 9c3c5f28..79dff9c5 100755 --- a/utils/rdautoback/rdautoback.py +++ b/utils/rdautoback/rdautoback.py @@ -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') diff --git a/utils/rdautocheck/rdautocheck.py b/utils/rdautocheck/rdautocheck.py index 205b36a5..bf34f8ce 100755 --- a/utils/rdautocheck/rdautocheck.py +++ b/utils/rdautocheck/rdautocheck.py @@ -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: