Thanks for such a quick reply. Please note the use of “” around $DistroName if the code you posted above for your comparison of “$DistroName” = “debian” within single . With that it will work as intended, however lines 697 and 698 are missing “” around $DistroName within /var/lib/dpkg/info/plexmediaserver.postinst.
This can be solved by either using [] around the variable comparison or by editing the lines to be “$DistroName” instead of $DistroName
= is already a string comparison operator. "thing* Something" prevents unexpected globbing and allows inclusion of spaces, neither of which can appear in the value.
Would you be able to provide the query used for $DistroVersion? Just to double check manually to make sure the query would work with the rest of the && statement on my machine.
The only other thing I could think of is if $DistroName isn’t being populated correctly within the script causing a none existing value to be compared to.
I noticed the following setting variables at the top of /var/lib/dpkg/info/plexmediaserver.postinst but haven’t dug elsewhere in the code for it
The function GetConfig() is used to pass info from preinstall → postinstall.
I write the results of preinst to /tmp/plexinstaller.log
To prevent privilege escalation attacks, I use GetConfig to read the values from /tmp/plexinstaller.log and set the corresponding variables in postinst for use.
I originally saw the error with 1.28.1.6018 but have since updated as well to 1.28.1.6041, the install logs are above but I will just post them again for ease of use.
sudo dpkg -i samba/plexmediaserver_1.28.1.6041-738907df3_amd64.deb
(Reading database ... 404081 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.28.1.6041-738907df3_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver (1.28.1.6041-738907df3) over (1.28.1.6018-c1f308c6a) ...
Setting up plexmediaserver (1.28.1.6041-738907df3) ...
PlexMediaServer install: PlexMediaServer-1.28.1.6041-738907df3 - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install: Installation Type: Update
PlexMediaServer install: Process Control: systemd
PlexMediaServer install: Plex User: plex
PlexMediaServer install: Plex Group: plex
PlexMediaServer install: Video Group: video
PlexMediaServer install: Metadata Dir: /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install: Temp Directory: /tmp
PlexMediaServer install: Lang Encoding: en_US.UTF-8
PlexMediaServer install: Processor: AMD Ryzen 5 3600 6-Core Processor
PlexMediaServer install: Config file used: /etc/systemd/system/plexmediaserver.service.d/override.conf
PlexMediaServer install: Nvidia GPU card: Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
/var/lib/dpkg/info/plexmediaserver.postinst: line 697: [: =: unary operator expected
/var/lib/dpkg/info/plexmediaserver.postinst: line 698: [: =: unary operator expected
PlexMediaServer install: PlexMediaServer-1.28.1.6041-738907df3 - Installation successful. Errors: 0, Warnings: 0
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for mailcap (3.69) ...
Thanks for all your help with this ChuckPa, much appreciated!
5.16.0-0.bpo.4-amd64 kernel was installed through backports, I needed it for better support for a few drivers/devices and for updated zfs version for my system
My /etc/apt/sources.list file
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
# bullseye-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb [arch=amd64] https://download.docker.com/linux/debian/ bullseye stable
My /etc/apt/sources.list.d/bullseye-backports.list file
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free