[General Questions and Answers] ipdev:
Hi. :)

What device and version of LineageOS are you using?

The lineage add on su was depreciated after lineage 16.

If you are using Lineage 17 or newer, you will need to use Magisk for root.

Are you using TWRP for recovery or lineage's recovery?

If you are using TWRP, the recovery log file will be more complete and should help figure out what is triggering the error.

The TWRP recovery log file is saved in the tmp directory.

/tmp/recovery.log

If you need links to Magisk, these are the official links.

Downloads are in the github releases page.

Magisk GitHub - Link

Magisk GitHub - Releases - Link

Magisk General Support / Discussion xdaThread - Link

Article about lineage discontinuing add on su.

LineageOS is dropping its own superuser implementation - xdaArticle - Link

What each line in META-INF/com/google/android/updater-script is doing.

ifelse(is_mounted("/system"), unmount("/system"));
package_extract_file("mount-system.sh", "/tmp/mount-system.sh");
package_extract_file("unmount-system.sh", "/tmp/unmount-system.sh");
set_metadata("/tmp/mount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
set_metadata("/tmp/unmount-system.sh", "uid", 0, "gid", 0, "mode", 0755);
run_program("/tmp/mount-system.sh") == 0 || abort("Could not mount /system");

Check and unmount system if mounted.

Extract the mount-system script from the zip file into the temp directory.

Extract the unmount-system script from the zip file into the temp directory.

Set the permissions for the mount script.

Set the permissions for the unmount script.

Mount system or error out if system can not be mounted.

Then.

if getprop("ro.build.system_root_image") != "true" then
package_extract_dir("system", "/system");
set_metadata("/system/addon.d/51-addonsu.sh", "uid", 0, "gid", 0, "mode", 0755, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/etc/init/superuser.rc", "uid", 0, "gid", 0, "mode", 0644, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "selabel", "u:object_r:su_exec:s0");
symlink("/system/xbin/su", "/system/bin/su");
else
package_extract_dir("system", "/system_root/system");
set_metadata("/system_root/system/addon.d/51-addonsu.sh", "uid", 0, "gid", 0, "mode", 0755, "selabel", "u:object_r:system_file:s0");
set_metadata("/system_root/system/etc/init/superuser.rc", "uid", 0, "gid", 0, "mode", 0644, "selabel", "u:object_r:system_file:s0");
set_metadata("/system_root/system/xbin/su", "uid", 0, "gid", 2000, "mode", 0755, "selabel", "u:object_r:su_exec:s0");
symlink("/system/xbin/su", "/system_root/system/bin/su");
endif;

The first part is for a traditional device.

System is mounted to /system​

Check if system is rooted, if not then

Extract the su files from the system directory in the zip file into the system directory.

Set the permissions for the addon.d backup script.

This is the script that runs when you update lineage. It will back up and restore the su files and permissions.​

Set the permissions for the superuser rc file.

Set the permissions for the su binary.

Creates a link from bin to xbin.

If su is called from system/bin, it will use system/xbin/su​

The second part (else) runs the same commands as the first part on a system as root device.

System is mounted as system_root/system (This would not work on a device that uses /system/system.)​

The endif line just closes the if-then-else statement.

The last part.

run_program("/tmp/unmount-system.sh") == 0 || ui_print("Could not unmount /system");
ui_print("Done");
set_progress(1.000000);

Unmount system or error out if system can not be unmounted.

Display "Done" on the screen.

Set progress to 100%

Hope this helps more than confuse.

Cheers. :cowboy: